Conversation
db49865 to
b896382
Compare
MadLittleMods
commented
Feb 22, 2021
build/scripts/find-lint.sh
Outdated
Collaborator
Author
There was a problem hiding this comment.
The -v thing seems to only work on bash 4.2 and above, https://unix.stackexchange.com/a/212192/52320
On macOS 11.1
bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin20)
Copyright (C) 2007 Free Software Foundation, Inc.
See - `-v` only supported in newer bash 4.2 or above: https://unix.stackexchange.com/a/212192/52320 - How to test for environemmnt variable existence, https://stackoverflow.com/a/13864829/796832 - No-op: https://unix.stackexchange.com/a/287867/52320
b896382 to
b591d9b
Compare
MadLittleMods
commented
Feb 22, 2021
| fi | ||
|
|
||
| if [[ -v COMPLEMENT_LINT_CONCURRENCY ]]; then | ||
| if [ -z ${COMPLEMENT_LINT_CONCURRENCY+x} ]; then |
Collaborator
Author
There was a problem hiding this comment.
Instead of using the empty if-case, I tried using -n but it doesn't seem to behave the same as the -z and else
-n
string is not null.-z
string is null, that is, has zero length
if [ -n ${COMPLEMENT_LINT_CONCURRENCY+x} ]; then
$ ./build/scripts/find-lint.sh
./build/scripts/find-lint.sh: line 23: COMPLEMENT_LINT_CONCURRENCY: unbound variable
$ COMPLEMENT_LINT_CONCURRENCY=1 ./build/scripts/find-lint.sh
No issues found :)
MadLittleMods
added a commit
that referenced
this pull request
Feb 22, 2021
kegsay
added a commit
that referenced
this pull request
Feb 23, 2021
* Add application service support to blueprints Split out from #68 * Revert always showing logs * Add comment doc * Some nits and remove the volume paths - Seems like the `Volumes` syntax is to create an anonymous volume, https://stackoverflow.com/a/58916037/796832 - And lots of people not knowing what `Volumes` syntax is or what to do. Seems like Mounts is the thing to use - fsouza/go-dockerclient#155 - https://stackoverflow.com/questions/55718603/golang-docker-library-mounting-host-directory-volumes - https://stackoverflow.com/questions/48470194/defining-a-mount-point-for-volumes-in-golang-docker-sdk * Address review and add comment docs * Revert lint change already in other PR #73 * Path escape AS IDs to avoid directory traversal attacks Co-authored-by: Kegan Dougal <kegan@matrix.org>
kegsay
approved these changes
Mar 1, 2021
Collaborator
Author
|
Thanks for the review and merge @kegsay 🐭 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix lint script to run on macOS 11.1
See
-vonly supported in newer bash 4.2 or above: https://unix.stackexchange.com/a/212192/52320:: https://unix.stackexchange.com/a/287867/52320Before:
After:
Alternative if we want
COMPLEMENT_LINT_CONCURRENCYto be required:...
After: