diff --git a/Cargo.lock b/Cargo.lock index da46cf4a9..29e8983f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,6 +8,15 @@ version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +[[package]] +name = "addr2line" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -426,7 +435,7 @@ checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] @@ -443,7 +452,7 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] @@ -790,6 +799,21 @@ dependencies = [ "zeroize", ] +[[package]] +name = "backtrace" +version = "0.3.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide 0.6.2", + "object", + "rustc-demangle", +] + [[package]] name = "base16ct" version = "0.1.1" @@ -1049,9 +1073,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.5" +version = "4.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2686c4115cb0810d9a984776e197823d08ec94f176549a89a9efded477c456dc" +checksum = "bba77a07e4489fb41bd90e8d4201c3eb246b3c2c9ea2ba0bddd6c1d1df87db7d" dependencies = [ "clap_builder", "clap_derive", @@ -1070,9 +1094,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.3.5" +version = "4.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e53afce1efce6ed1f633cf0e57612fe51db54a1ee4fd8f8503d078fe02d69ae" +checksum = "2c9b4a88bb4bc35d3d6f65a21b0f0bafe9c894fa00978de242c555ec28bea1c0" dependencies = [ "anstream", "anstyle", @@ -1100,7 +1124,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] @@ -1335,7 +1359,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] @@ -1346,7 +1370,7 @@ checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" dependencies = [ "darling_core", "quote", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] @@ -1468,7 +1492,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] @@ -1565,7 +1589,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] @@ -1581,6 +1605,12 @@ dependencies = [ "termcolor", ] +[[package]] +name = "equivalent" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" + [[package]] name = "errno" version = "0.3.1" @@ -1646,7 +1676,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.7.1", ] [[package]] @@ -1762,7 +1792,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] @@ -1836,6 +1866,12 @@ dependencies = [ "wasi 0.11.0+wasi-snapshot-preview1", ] +[[package]] +name = "gimli" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" + [[package]] name = "glob" version = "0.3.1" @@ -1866,9 +1902,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ "bytes 1.4.0", "fnv", @@ -1876,7 +1912,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -1889,6 +1925,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + [[package]] name = "heck" version = "0.4.1" @@ -1988,9 +2030,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes 1.4.0", "futures-channel", @@ -2098,10 +2140,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", "serde", ] +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + [[package]] name = "indicatif" version = "0.17.5" @@ -2170,9 +2222,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.7.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "is-terminal" @@ -2317,9 +2369,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.146" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libloading" @@ -2488,6 +2540,15 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +[[package]] +name = "miniz_oxide" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +dependencies = [ + "adler", +] + [[package]] name = "miniz_oxide" version = "0.7.1" @@ -2595,9 +2656,9 @@ dependencies = [ [[package]] name = "num-bigint-dig" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2399c9463abc5f909349d8aa9ba080e0b88b3ce2885389b60b993f39b1a56905" +checksum = "53ba502077159ace3aa56c25449a007173a406607a94ef665247246191eb38b1" dependencies = [ "byteorder", "lazy_static", @@ -2678,6 +2739,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" +[[package]] +name = "object" +version = "0.30.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" +dependencies = [ + "memchr", +] + [[package]] name = "oid-registry" version = "0.6.1" @@ -2722,7 +2792,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] @@ -2891,7 +2961,7 @@ checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] @@ -2919,7 +2989,7 @@ dependencies = [ "dirs 5.0.1", "dunce", "futures 0.3.28", - "indexmap", + "indexmap 1.9.3", "indicatif", "insta", "is_executable", @@ -2987,7 +3057,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bd9647b268a3d3e14ff09c23201133a62589c658db02bb7388c7246aafe0590" dependencies = [ "base64 0.21.2", - "indexmap", + "indexmap 1.9.3", "line-wrap", "quick-xml", "serde", @@ -3058,9 +3128,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.60" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" +checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" dependencies = [ "unicode-ident", ] @@ -3160,7 +3230,7 @@ dependencies = [ [[package]] name = "rattler" version = "0.4.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#bb834bcca8a58411cdca20f2bc8f4711380c6bd7" +source = "git+https://github.com/mamba-org/rattler?branch=main#efa728491051cc0f1fb62429b6bc56b98287ac09" dependencies = [ "anyhow", "apple-codesign", @@ -3201,7 +3271,7 @@ dependencies = [ [[package]] name = "rattler_conda_types" version = "0.4.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#bb834bcca8a58411cdca20f2bc8f4711380c6bd7" +source = "git+https://github.com/mamba-org/rattler?branch=main#efa728491051cc0f1fb62429b6bc56b98287ac09" dependencies = [ "chrono", "fxhash", @@ -3229,7 +3299,7 @@ dependencies = [ [[package]] name = "rattler_digest" version = "0.4.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#bb834bcca8a58411cdca20f2bc8f4711380c6bd7" +source = "git+https://github.com/mamba-org/rattler?branch=main#efa728491051cc0f1fb62429b6bc56b98287ac09" dependencies = [ "blake2", "digest 0.10.7", @@ -3244,16 +3314,16 @@ dependencies = [ [[package]] name = "rattler_macros" version = "0.4.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#bb834bcca8a58411cdca20f2bc8f4711380c6bd7" +source = "git+https://github.com/mamba-org/rattler?branch=main#efa728491051cc0f1fb62429b6bc56b98287ac09" dependencies = [ "quote", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] name = "rattler_networking" version = "0.4.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#bb834bcca8a58411cdca20f2bc8f4711380c6bd7" +source = "git+https://github.com/mamba-org/rattler?branch=main#efa728491051cc0f1fb62429b6bc56b98287ac09" dependencies = [ "anyhow", "dirs 5.0.1", @@ -3270,7 +3340,7 @@ dependencies = [ [[package]] name = "rattler_package_streaming" version = "0.4.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#bb834bcca8a58411cdca20f2bc8f4711380c6bd7" +source = "git+https://github.com/mamba-org/rattler?branch=main#efa728491051cc0f1fb62429b6bc56b98287ac09" dependencies = [ "bzip2", "chrono", @@ -3293,7 +3363,7 @@ dependencies = [ [[package]] name = "rattler_repodata_gateway" version = "0.4.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#bb834bcca8a58411cdca20f2bc8f4711380c6bd7" +source = "git+https://github.com/mamba-org/rattler?branch=main#efa728491051cc0f1fb62429b6bc56b98287ac09" dependencies = [ "anyhow", "async-compression", @@ -3331,10 +3401,10 @@ dependencies = [ [[package]] name = "rattler_shell" version = "0.4.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#bb834bcca8a58411cdca20f2bc8f4711380c6bd7" +source = "git+https://github.com/mamba-org/rattler?branch=main#efa728491051cc0f1fb62429b6bc56b98287ac09" dependencies = [ "enum_dispatch", - "indexmap", + "indexmap 1.9.3", "itertools", "rattler_conda_types", "serde_json", @@ -3346,7 +3416,7 @@ dependencies = [ [[package]] name = "rattler_solve" version = "0.4.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#bb834bcca8a58411cdca20f2bc8f4711380c6bd7" +source = "git+https://github.com/mamba-org/rattler?branch=main#efa728491051cc0f1fb62429b6bc56b98287ac09" dependencies = [ "anyhow", "cc", @@ -3367,7 +3437,7 @@ dependencies = [ [[package]] name = "rattler_virtual_packages" version = "0.4.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#bb834bcca8a58411cdca20f2bc8f4711380c6bd7" +source = "git+https://github.com/mamba-org/rattler?branch=main#efa728491051cc0f1fb62429b6bc56b98287ac09" dependencies = [ "cfg-if", "libloading", @@ -3554,6 +3624,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[package]] name = "rustc_version" version = "0.4.0" @@ -3624,9 +3700,9 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ "base64 0.21.2", ] @@ -3700,7 +3776,7 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] @@ -3813,16 +3889,16 @@ checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] name = "serde_json" -version = "1.0.97" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf3bf93142acad5821c99197022e170842cdbc1c30482b98750c688c640842a" +checksum = "46266871c240a00b8f503b877622fe33430b3c7d963bdc0f2adc511e54a1eae3" dependencies = [ - "indexmap", + "indexmap 2.0.0", "itoa", "ryu", "serde", @@ -3836,14 +3912,14 @@ checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] name = "serde_spanned" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" dependencies = [ "serde", ] @@ -3869,7 +3945,7 @@ dependencies = [ "base64 0.21.2", "chrono", "hex", - "indexmap", + "indexmap 1.9.3", "serde", "serde_json", "serde_with_macros", @@ -3885,16 +3961,16 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] name = "serde_yaml" -version = "0.9.21" +version = "0.9.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9d684e3ec7de3bf5466b32bd75303ac16f0736426e5a4e0d6e489559ce1249c" +checksum = "452e67b9c20c37fa79df53201dc03839651086ed9bbe92b3ca585ca9fdaa7d85" dependencies = [ - "indexmap", + "indexmap 2.0.0", "itoa", "ryu", "serde", @@ -4124,9 +4200,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.18" +version = "2.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "2efbeae7acf4eabd6bcdcbd11c92f45231ddda7539edc7806bd1a04a03b24616" dependencies = [ "proc-macro2", "quote", @@ -4227,7 +4303,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] @@ -4295,11 +4371,12 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.2" +version = "1.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" +checksum = "374442f06ee49c3a28a8fc9f01a2596fed7559c6b99b31279c3261778e77d84f" dependencies = [ "autocfg", + "backtrace", "bytes 1.4.0", "libc", "mio", @@ -4329,7 +4406,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] @@ -4390,20 +4467,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.10" +version = "0.19.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" +checksum = "266f016b7f039eec8a1a80dfe6156b633d208b9fccca5e4db1d6775b0c4e34a7" dependencies = [ - "indexmap", + "indexmap 2.0.0", "serde", "serde_spanned", "toml_datetime", @@ -4459,7 +4536,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] @@ -4631,9 +4708,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.3.4" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa2982af2eec27de306107c027578ff7f423d65f7250e40ce0fea8f45248b81" +checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" dependencies = [ "getrandom 0.2.10", "rand", @@ -4721,7 +4798,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.22", "wasm-bindgen-shared", ] @@ -4755,7 +4832,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.22", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5192,7 +5269,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] diff --git a/src/cli/global/install.rs b/src/cli/global/install.rs index d147f43ca..fa046e5a5 100644 --- a/src/cli/global/install.rs +++ b/src/cli/global/install.rs @@ -11,7 +11,7 @@ use rattler_conda_types::{Channel, ChannelConfig, MatchSpec, Platform, PrefixRec use rattler_networking::AuthenticatedClient; use rattler_repodata_gateway::sparse::SparseRepoData; use rattler_shell::{ - activation::{ActivationVariables, Activator}, + activation::{ActivationVariables, Activator, PathModificationBehaviour}, shell::Shell, shell::ShellEnum, }; @@ -97,8 +97,10 @@ fn create_activation_script(prefix: &Prefix, shell: ShellEnum) -> anyhow::Result let result = activator.activation(ActivationVariables { conda_prefix: None, path: None, + path_modification_behaviour: PathModificationBehaviour::Prepend, })?; - Ok(result.script) + let script = format!("#!/bin/sh\n{}", result.script); + Ok(script) } fn is_executable(prefix: &Prefix, relative_path: &Path) -> bool { diff --git a/src/cli/run.rs b/src/cli/run.rs index 766c9c874..628a635f8 100644 --- a/src/cli/run.rs +++ b/src/cli/run.rs @@ -15,7 +15,7 @@ use crate::{ }; use rattler_shell::{ activation::ActivationResult, - activation::{ActivationVariables, Activator}, + activation::{ActivationVariables, Activator, PathModificationBehaviour}, shell::{Shell, ShellEnum}, }; @@ -72,6 +72,9 @@ pub async fn create_command(args: Args) -> anyhow::Result { // Start from an empty prefix conda_prefix: None, + + // Prepending environment paths so they get found first. + path_modification_behaviour: PathModificationBehaviour::Prepend, })?; // Generate a temporary file with the script to execute. This includes the activation of the diff --git a/src/cli/shell.rs b/src/cli/shell.rs index 807753827..b06ebb90a 100644 --- a/src/cli/shell.rs +++ b/src/cli/shell.rs @@ -3,7 +3,7 @@ use crate::project::environment::add_metadata_as_env_vars; use crate::Project; use clap::Parser; use rattler_conda_types::Platform; -use rattler_shell::activation::{ActivationVariables, Activator}; +use rattler_shell::activation::{ActivationVariables, Activator, PathModificationBehaviour}; use rattler_shell::shell::{Shell, ShellEnum}; use std::path::PathBuf; @@ -31,6 +31,9 @@ pub async fn execute(args: Args) -> anyhow::Result<()> { // Start from an empty prefix conda_prefix: None, + + // Prepending environment paths so they get found first. + path_modification_behaviour: PathModificationBehaviour::Prepend, })?; // Generate a temporary file with the script to execute. This includes the activation of the