ITADN

Script module is now failing with errors

#526Openkinggrowler 创建于 2025-12-29
type: bug
K
kinggrowlercommented
The updated script module from [515](https://github.com/blue-build/modules/pull/515) is failing my scripts with multiple errors. ``` ============================ Start 'script' Module ============================ Running script: /tmp/files/scripts/01-base-main.sh Error: nu::shell::eval_block_with_input × Eval block failed with pipeline input ╭─[/tmp/modules/script/script.nu:5:7] 4 │ let config = $config 5 │ | from json · ────┬──── · ╰── source value 6 │ | default [] scripts ╰──── Error: nu::shell::io::uncategorized_error × I/O error ╰─▶ × Could not spawn foreground child: Exec format error (os error │ 8) ╭──── 1 │ crates/nu-command/src/system/run_external.rs:279:49 · ─────────────────────────┬───────────────────────── · ╰── Uncategorized error ╰──── ============================ Failed 'script' Module ============================ ``` This script ran until the recent update. For completeness, this is the script the module is failing on: ``` #!/usr/bin/env bash set -xeuo pipefail source /usr/lib/os-release if [[ "$ID" == "fedora" && "$VERSION_ID" -ge 43 ]]; then layout=ostree" | tee /usr/lib/kernel/install.conf > /dev/null fi if [ -d "/usr/share/dnf5/libdnf.conf.d/" ]; then echo -e "[main]\ninstallonlypkgs=''" | tee /usr/share/dnf5/libdnf.conf.d/20-ostree-installonlypkgs.conf else echo "installonlypkgs=''" >> /etc/dnf/dnf.conf fi ``` This is how the script module is called from my recipe: ``` - type: script scripts: - 01-base-main.sh - 02-base-packages.sh - 10-core.sh - 11-bootupd.sh - 12-initramfs.sh - 13-sysroot-ro.sh - 14-composefs.sh - 95-sanity-check.sh ``` Is it possible to roll-back this change on my end? Something like adding a source line at the top of the script-module block, like so: source: ghcr.io/blue-build/modules:<foo> Or do I have to re-write all my scripts for sh instead of bash? That will be a lot of work...
4 条评论