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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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

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

Join @topher200 and the rest of your teammates on Graphite Graphite

@@ -3,7 +3,7 @@

package:
name: {{ name }}
version: {{ version }}.memfault2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm keeping open a thread here until I run the GHA and push the new builds to Conda

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