Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use boolean context to handle STOW_DIR #7

Closed
wants to merge 1 commit into from
Closed

Do not use boolean context to handle STOW_DIR #7

wants to merge 1 commit into from

Conversation

cuonglm
Copy link
Contributor

@cuonglm cuonglm commented Nov 11, 2015

No description provided.

cuonglm referenced this pull request Nov 11, 2015
In shell, a variable is often considered unset even if it is
set to the empty string.  In other words,

  STOW_DIR= stow [args]

is an idiomatic alternative to writing:

  unset STOW_DIR
  stow [args]

and it also has the advantage of temporarily "unsetting" STOW_DIR
for a single command.

Therefore we should treat STOW_DIR being set to the empty string
as equivalent to it not being set at all.

Thanks to Cuong Manh Le for highlighting this issue!

Fixes #6  - #6
Closes #5 - #5
@aspiers
Copy link
Owner

aspiers commented Nov 11, 2015

Thanks but I prefer to handle it a slightly different way. This would not give any error if the user invokes stow -d '', and it should do.

@aspiers aspiers closed this in a111eeb Nov 11, 2015
@cuonglm
Copy link
Contributor Author

cuonglm commented Nov 11, 2015

@aspiers: Ah yeah, it's better than mine. +1!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants