Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.7 kB · 41 lines
123456789101112131415161718192021222324252627282930313233343536373839404142diff --git a/craft_parts/executor/step_handler.py b/craft_parts/executor/step_handler.pyindex 404df69..f90e2ac 100644--- a/craft_parts/executor/step_handler.py+++ b/craft_parts/executor/step_handler.py@@ -243,8 +243,9 @@ class StepHandler: print(script, file=script_file) script_file.flush() script_file.seek(0)+ import shutil process = subprocess.Popen( # pylint: disable=consider-using-with- ["/bin/bash"],+ [shutil.which("bash")], stdin=script_file, cwd=work_dir, stdout=self._stdout,@@ -394,7 +395,8 @@ def _create_and_run_script( ) -> None: """Create a script with step-specific commands and execute it.""" with script_path.open("w") as run_file:- print("#!/bin/bash", file=run_file)+ import shutil+ print(f"#!{shutil.which('bash')}", file=run_file) print("set -euo pipefail", file=run_file) if build_environment_script_path:diff --git a/craft_parts/plugins/validator.py b/craft_parts/plugins/validator.pyindex b8d8f11..fce0e72 100644--- a/craft_parts/plugins/validator.py+++ b/craft_parts/plugins/validator.py@@ -142,9 +142,9 @@ class PluginEnvironmentValidator: print(self._env, file=env_file) print(cmd, file=env_file) env_file.flush()-+ import shutil proc = subprocess.run(- ["/bin/bash", env_file.name],+ [shutil.which("bash"), env_file.name], check=True, capture_output=True, text=True,