RichardLiu2001 opened a new pull request, #3472:
URL: https://github.com/apache/polaris/pull/3472

   <!--
   ๐Ÿ“ Describe what changes you're proposing, especially breaking or user-facing 
changes. 
   ๐Ÿ“– See https://github.com/apache/polaris/blob/main/CONTRIBUTING.md for more.
   -->
   
   The [CLI 
docs](https://github.com/apache/polaris/blob/main/site/content/in-dev/unreleased/command-line-interface.md#path)
 currently recommend adding Polaris to PATH using `export 
PATH="~/polaris:$PATH"`.
   
   In zsh (default in mac), ~ is not reliably expanded when quoted, which can 
leave a literal `~/polaris` entry in PATH. This causes polaris to not be found 
even after following the docs.
   - Many mac users like myself will follow these instructions as-is, so using 
`$HOME` avoids a common footgun.
   ```
   โฏ docker run --rm -it zshusers/zsh:latest
   4ea452cea1fc# mkdir -p ~/polaris
   4ea452cea1fc# print 'echo POLARIS\n' > ~/polaris/polaris
   4ea452cea1fc# chmod +x ~/polaris/polaris
   
   4ea452cea1fc# export PATH="~/polaris:$PATH"
   4ea452cea1fc# command -v polaris || echo "not found"
   
   not found
   
   4ea452cea1fc# export PATH="$HOME/polaris:$PATH"
   4ea452cea1fc# command -v polaris
   
   /root/polaris/polaris
   ```
   
   Although the docs use bash-style examples, `$HOME` works reliably across 
both bash and zsh, especially in quoted PATH exports.
   
   ## Checklist
   - [x] ๐Ÿ›ก๏ธ Don't disclose security issues! (contact [email protected])
   - [x] ๐Ÿ”— Clearly explained why the changes are needed, or linked related 
issues: Fixes #
   - [x] ๐Ÿงช Added/updated tests with good coverage, or manually tested (and 
explained how)
   - [x] ๐Ÿ’ก Added comments for complex logic
   - [x] ๐Ÿงพ Updated `CHANGELOG.md` (if needed)
   - [x] ๐Ÿ“š Updated documentation in `site/content/in-dev/unreleased` (if needed)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to