Skip to content

Conversation

@gmpinder
Copy link
Member

@gmpinder gmpinder commented Jan 4, 2026

Fixes the previous fix that was reverted. Updated to use a glob to recursively find all .sh and .nu files and mark them as executable.

@gmpinder gmpinder self-assigned this Jan 4, 2026
@gmpinder gmpinder force-pushed the fix-executable-script branch from eba929d to 6d60d28 Compare January 4, 2026 16:31

cd $'($env.CONFIG_DIRECTORY)/scripts'
^find . -type f -execdir chmod +x '{}' +
glob ./**/*{.sh,.nu}
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

That sounds reasonable.

@gmpinder
Copy link
Member Author

gmpinder commented Jan 6, 2026

I have a PR running with this change, here's the build to see if it works

@HastD
Copy link
Contributor

HastD commented Jan 6, 2026

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.

@gmpinder
Copy link
Member Author

gmpinder commented Jan 7, 2026

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.

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.

3 participants