From a04a2cc849483dc99ae4f499103e35d35f0b872e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Wawrzyniec=20Urba=C5=84czyk?= Date: Wed, 29 Nov 2023 20:35:06 +0100 Subject: [PATCH] Build script: git-clean and cwd fixes (#8424) --- build/cli/src/lib.rs | 2 +- run | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/build/cli/src/lib.rs b/build/cli/src/lib.rs index b4812bb35b..2830939a72 100644 --- a/build/cli/src/lib.rs +++ b/build/cli/src/lib.rs @@ -878,7 +878,7 @@ pub async fn main_internal(config: Option) -> Result { let crate::arg::git_clean::Options { dry_run, cache, build_script } = options; let mut exclusions = vec![".idea"]; if !build_script { - exclusions.push("target/enso-build"); + exclusions.push("target/rust/buildscript"); } if !dry_run { diff --git a/run b/run index c3ec5e1523..7000818e4b 100755 --- a/run +++ b/run @@ -1,4 +1,10 @@ #!/usr/bin/env bash set -e # Exit on error. +# Change working directory to the script's directory. +pushd "$(dirname "$0")" > /dev/null + cargo run --profile buildscript --package enso-build-cli -- $@ + +# Revert to the original working directory. +popd > /dev/null