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

chore(volta): Make volta_deactivate.sh more portable #84

Conversation

topher200
Copy link
Contributor

Issues addressed

I've been getting an issue locally when running volta via lefthook.
Specifically, I'd see an error like this:

$ git commit -am Test
.git/hooks/post-checkout: 13: /home/topher/miniforge3/envs/memfault/etc/conda/deactivate.d/volta_deactivate.sh: Bad substitution
ERROR: Command failed with error exit code 1:

I tracked the issue down to non-portable bash-specific handling.

Summary of changes

I think adding the shebang (#!/bin/bash) should have been
sufficient here to get my local machine working, however this had no
impact.

I'm not going to spend a ton of time debugging this; I re-wrote it to be
more portable and avoid the problematic field.

Test Plan

  • I can now run git commit without error

### Issues addressed
I've been getting an issue locally when running volta via lefthook.
Specifically, I'd see an error like this:

```
$ git commit -am Test
.git/hooks/post-checkout: 13: /home/topher/miniforge3/envs/memfault/etc/conda/deactivate.d/volta_deactivate.sh: Bad substitution
ERROR: Command failed with error exit code 1:
```

I tracked the issue down to non-portable bash-specific handling.

### Summary of changes
I _think_ adding the shebang (`#!/bin/bash`) _should_ have been
sufficient here to get my local machine working, however this had no
impact.

I'm not going to spend a ton of time debugging this; I re-wrote it to be
more portable and avoid the problematic field.

### Test Plan
- [x] I can now run `git commit` without error
@topher200 topher200 requested review from noahp and a team as code owners October 8, 2024 21:42
Copy link
Contributor Author

topher200 commented Oct 8, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

@topher200 topher200 marked this pull request as draft November 6, 2024 23:19
@topher200 topher200 marked this pull request as ready for review December 24, 2024 16:50
@topher200 topher200 merged commit 0cc1f56 into master Dec 24, 2024
4 checks passed
@topher200 topher200 deleted the topher/10-08-chore_volta_make_volta_deactivate.sh_more_portable branch December 24, 2024 16:50
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.

2 participants