-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix: git-standup find error (#1106) #1110
Conversation
@@ -240,7 +240,11 @@ if [[ $in_git_repo != 0 ]]; then | |||
## Set delimiter to newline for the loop | |||
IFS=$'\n' | |||
## Recursively search for git repositories | |||
PROJECT_DIRS=$(find "$INCLUDE_LINKS" . -maxdepth "$MAXDEPTH" -mindepth 0 -name .git) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the catch! A simpler fix would be to remove the quotes from $INCLUDE_LINKS
. Either way LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I implemented this way because of the shellcheck output:
➜ shellcheck git-extras/bin/git-standup
In git-extras/bin/git-standup line 244:
PROJECT_DIRS=$(find . -maxdepth $MAXDEPTH -mindepth 0 -name .git)
^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
PROJECT_DIRS=$(find . -maxdepth "$MAXDEPTH" -mindepth 0 -name .git)
For more information:
https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see - yeah that would be a false positive. Unfortunately some ShellCheck rules seem to have a lot of false positives.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can change it to your suggestion. It's your decision.
But until now shellcheck like the file. ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use something like #shellcheck disable=SC2086
to disable the spurious warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
dce1ffb
to
7e67dd3
Compare
@@ -240,7 +240,11 @@ if [[ $in_git_repo != 0 ]]; then | |||
## Set delimiter to newline for the loop | |||
IFS=$'\n' | |||
## Recursively search for git repositories | |||
PROJECT_DIRS=$(find "$INCLUDE_LINKS" . -maxdepth "$MAXDEPTH" -mindepth 0 -name .git) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
No description provided.