-
Notifications
You must be signed in to change notification settings - Fork 26
fix(script-v2): Use nushell built-ins #529
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
base: main
Are you sure you want to change the base?
Conversation
eba929d to
6d60d28
Compare
6d60d28 to
9215df9
Compare
modules/script/v2/script.nu
Outdated
|
|
||
| cd $'($env.CONFIG_DIRECTORY)/scripts' | ||
| ^find . -type f -execdir chmod +x '{}' + | ||
| glob ./**/*{.sh,.nu} |
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.
Scripts could be written in other languages too, right? For example, someone could have a Python script with a .py extension. So I'm not sure it's a good idea to restrict extensions to .sh and .nu here.
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.
At the same time, I don't think it's a good idea to just set every file to executable. Maybe we do this for specific file types and on line 25 we mark the file that's about to be run as executable in case it didn't have the correct extensions. This way all .sh and .nu script files that could be included via one of the module scripts are still executable.
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.
That sounds reasonable.
|
I have a PR running with this change, here's the build to see if it works |
|
The failure in "multi-platform-buildah" looks like it's just due to a transient network error, but the failure in "arm64-build" looks like it could be related to this PR, though I'm not sure at a glance what the cause is. |
The arm build is failing because of the arch Linux image in a stage. That's why I have another PR open for adding the ability to set the platform for a stage. |
Fixes the previous fix that was reverted. Updated to use a glob to recursively find all
.shand.nufiles and mark them as executable.