B
BlueBuild4mo ago
Brody

BlueBuild failing to run scripts on local rebase

Just started to encounter an issue when trying to build an image locally using bluebuild CLI. Whenever I run the scripts module, the build fails when it tries to run a specified script. I have two scripts, and they both suddenly have this issue. I haven't changed these scripts in a while, but perhaps I missed a note that they need to be relocated? The error I'm getting:
oci-archive:/etc/bluebuild/ublue-brody-apollo.tar.gz => ================================================ Start 'script' Module ================================================
oci-archive:/etc/bluebuild/ublue-brody-apollo.tar.gz => Running script removeBluefinWallpapers.sh
oci-archive:/etc/bluebuild/ublue-brody-apollo.tar.gz => /usr/bin/env: 'bash\r': No such file or directory
oci-archive:/etc/bluebuild/ublue-brody-apollo.tar.gz => /usr/bin/env: use -[v]S to pass options in shebang lines
oci-archive:/etc/bluebuild/ublue-brody-apollo.tar.gz => Error: building at STEP "RUN --mount=type=bind,from=stage-files,src=/files,dst=/tmp/files,rw --mount=type=bind,from=stage-modules,src=/modules,dst=/tmp/modules,rw --mount=type=bind,from=ghcr.io/blue-build/cli:3ecb0d3d939b127fa47460ea07008bc6621e4fa5-build-scripts,src=/scripts/,dst=/tmp/scripts/ --mount=type=cache,dst=/var/cache/rpm-ostree,id=rpm-ostree-cache-ublue-brody-apollo-latest,sharing=locked /tmp/scripts/run_module.sh 'script' '{"type":"script","scripts":["removeBluefinWallpapers.sh"]}' && ostree container commit": while running runtime: exit status 127
oci-archive:/etc/bluebuild/ublue-brody-apollo.tar.gz => ================================================ Start 'script' Module ================================================
oci-archive:/etc/bluebuild/ublue-brody-apollo.tar.gz => Running script removeBluefinWallpapers.sh
oci-archive:/etc/bluebuild/ublue-brody-apollo.tar.gz => /usr/bin/env: 'bash\r': No such file or directory
oci-archive:/etc/bluebuild/ublue-brody-apollo.tar.gz => /usr/bin/env: use -[v]S to pass options in shebang lines
oci-archive:/etc/bluebuild/ublue-brody-apollo.tar.gz => Error: building at STEP "RUN --mount=type=bind,from=stage-files,src=/files,dst=/tmp/files,rw --mount=type=bind,from=stage-modules,src=/modules,dst=/tmp/modules,rw --mount=type=bind,from=ghcr.io/blue-build/cli:3ecb0d3d939b127fa47460ea07008bc6621e4fa5-build-scripts,src=/scripts/,dst=/tmp/scripts/ --mount=type=cache,dst=/var/cache/rpm-ostree,id=rpm-ostree-cache-ublue-brody-apollo-latest,sharing=locked /tmp/scripts/run_module.sh 'script' '{"type":"script","scripts":["removeBluefinWallpapers.sh"]}' && ostree container commit": while running runtime: exit status 127
And one of the scripts it's happening with: https://github.com/BrodyB/ublue-brody/blob/main/files/scripts/removeBluefinWallpapers.sh
GitHub
ublue-brody/files/scripts/removeBluefinWallpapers.sh at main · Brod...
Contribute to BrodyB/ublue-brody development by creating an account on GitHub.
Solution:
This looks like this is a carriage return character. That's usually inserted when it is being edited on a Windows based machine. Try deleting the line and re-adding it in a Linux based environment. That might get rid of that carriage return character in your script.
Jump to solution
6 Replies
xyny
xyny4mo ago
weird, this seems like the error: oci-archive:/etc/bluebuild/ublue-brody-apollo.tar.gz => /usr/bin/env: 'bash\r': No such file or directory i don't know why it would be trying to launch bash\r maybe @gmpinder has a clue since this is with a local CLI only and not in github
Brody
BrodyOP4mo ago
Yeah, my GitHub actions are still strumming along just fine.
Solution
Luke Skywunker
Luke Skywunker4mo ago
This looks like this is a carriage return character. That's usually inserted when it is being edited on a Windows based machine. Try deleting the line and re-adding it in a Linux based environment. That might get rid of that carriage return character in your script.
Brody
BrodyOP4mo ago
Ugh, I've been dealing with so much LF/CLRF nonsense lately. Thanks!
Luke Skywunker
Luke Skywunker4mo ago
There's a way to tell Git to remove character return/line feed and replace it with just the new line character, but I cannot remember how to do that.
Brody
BrodyOP4mo ago
Yeah, I thought I had that set up already, but I guess stuff gets through the cracks 🤷‍♂️
Want results from more Discord servers?
Add your server