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

get secret --add existing regex pattern returns exit code 1 #24

Closed
weymanf opened this issue May 3, 2016 · 2 comments
Closed

get secret --add existing regex pattern returns exit code 1 #24

weymanf opened this issue May 3, 2016 · 2 comments

Comments

@weymanf
Copy link

weymanf commented May 3, 2016

We have scripts to set up our machines. But whenever we run it a second time with git secrets, it will fail on adding the same pattern matcher.

Apparently running git secret --add --global "<existing pattern>" to a pattern already configured will return an exit code 1 thus causing our script to fail.

@mtdowling
Copy link
Contributor

You could append || true to the end of the line that calls git secrets --add to ignore failures.

@weymanf
Copy link
Author

weymanf commented May 4, 2016

That is what I've done, but I'm afraid I might make a typo one day and it will just silently fail.

@weymanf weymanf closed this as completed May 5, 2016
monfresh added a commit to 18F/laptop that referenced this issue Jul 29, 2016
**Why**: If a git secrets config is already present, running a `git secrets` command will exit with status 1, preventing the laptop script from executing the rest of the script.

**How**: Add `|| true` to the end of all `git secrets` commands (except the first one that installs git secrets). See: awslabs/git-secrets#24
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

No branches or pull requests

2 participants