diff --git a/.ghjk/deno.lock b/.ghjk/deno.lock index 670c2b7..8ec1e4b 100644 --- a/.ghjk/deno.lock +++ b/.ghjk/deno.lock @@ -1,100 +1,95 @@ { - "version": "3", - "packages": { - "specifiers": { - "jsr:@david/dax@0.41.0": "jsr:@david/dax@0.41.0", - "jsr:@david/which@^0.4.1": "jsr:@david/which@0.4.1", - "jsr:@std/assert@^0.221.0": "jsr:@std/assert@0.221.0", - "jsr:@std/bytes@^0.221.0": "jsr:@std/bytes@0.221.0", - "jsr:@std/fmt@^0.221.0": "jsr:@std/fmt@0.221.0", - "jsr:@std/fs@0.221.0": "jsr:@std/fs@0.221.0", - "jsr:@std/io@0.221.0": "jsr:@std/io@0.221.0", - "jsr:@std/io@^0.221.0": "jsr:@std/io@0.221.0", - "jsr:@std/path@0.221.0": "jsr:@std/path@0.221.0", - "jsr:@std/path@^0.221.0": "jsr:@std/path@0.221.0", - "jsr:@std/streams@0.221.0": "jsr:@std/streams@0.221.0", - "npm:@noble/hashes@1.4.0": "npm:@noble/hashes@1.4.0", - "npm:multiformats@13.1.0": "npm:multiformats@13.1.0", - "npm:zod-validation-error@3.3.0": "npm:zod-validation-error@3.3.0_zod@3.23.8", - "npm:zod-validation-error@3.4.0": "npm:zod-validation-error@3.4.0_zod@3.23.8", - "npm:zod@3.23.8": "npm:zod@3.23.8" + "version": "4", + "specifiers": { + "jsr:@david/dax@0.41.0": "0.41.0", + "jsr:@david/which@~0.4.1": "0.4.1", + "jsr:@std/assert@0.221": "0.221.0", + "jsr:@std/bytes@0.221": "0.221.0", + "jsr:@std/fmt@0.221": "0.221.0", + "jsr:@std/fs@0.221.0": "0.221.0", + "jsr:@std/io@0.221": "0.221.0", + "jsr:@std/io@0.221.0": "0.221.0", + "jsr:@std/path@0.221": "0.221.0", + "jsr:@std/path@0.221.0": "0.221.0", + "jsr:@std/streams@0.221.0": "0.221.0", + "npm:@noble/hashes@1.4.0": "1.4.0", + "npm:multiformats@13.1.0": "13.1.0", + "npm:zod-validation-error@3.3.0": "3.3.0_zod@3.23.8", + "npm:zod-validation-error@3.4.0": "3.4.0_zod@3.23.8", + "npm:zod@3.23.8": "3.23.8" + }, + "jsr": { + "@david/dax@0.41.0": { + "integrity": "9e1ecf66a0415962cc8ad3ba4e3fa93ce0f1a1cc797dd95c36fdfb6977dc7fc8", + "dependencies": [ + "jsr:@david/which", + "jsr:@std/fmt", + "jsr:@std/fs", + "jsr:@std/io@0.221.0", + "jsr:@std/path@0.221.0", + "jsr:@std/streams" + ] + }, + "@david/which@0.4.1": { + "integrity": "896a682b111f92ab866cc70c5b4afab2f5899d2f9bde31ed00203b9c250f225e" + }, + "@std/assert@0.221.0": { + "integrity": "a5f1aa6e7909dbea271754fd4ab3f4e687aeff4873b4cef9a320af813adb489a" + }, + "@std/bytes@0.221.0": { + "integrity": "64a047011cf833890a4a2ab7293ac55a1b4f5a050624ebc6a0159c357de91966" + }, + "@std/fmt@0.221.0": { + "integrity": "379fed69bdd9731110f26b9085aeb740606b20428ce6af31ef6bd45ef8efa62a" + }, + "@std/fs@0.221.0": { + "integrity": "028044450299de8ed5a716ade4e6d524399f035513b85913794f4e81f07da286", + "dependencies": [ + "jsr:@std/assert", + "jsr:@std/path@0.221" + ] + }, + "@std/io@0.221.0": { + "integrity": "faf7f8700d46ab527fa05cc6167f4b97701a06c413024431c6b4d207caa010da", + "dependencies": [ + "jsr:@std/assert", + "jsr:@std/bytes" + ] + }, + "@std/path@0.221.0": { + "integrity": "0a36f6b17314ef653a3a1649740cc8db51b25a133ecfe838f20b79a56ebe0095", + "dependencies": [ + "jsr:@std/assert" + ] + }, + "@std/streams@0.221.0": { + "integrity": "47f2f74634b47449277c0ee79fe878da4424b66bd8975c032e3afdca88986e61", + "dependencies": [ + "jsr:@std/io@0.221" + ] + } + }, + "npm": { + "@noble/hashes@1.4.0": { + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==" + }, + "multiformats@13.1.0": { + "integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ==" + }, + "zod-validation-error@3.3.0_zod@3.23.8": { + "integrity": "sha512-Syib9oumw1NTqEv4LT0e6U83Td9aVRk9iTXPUQr1otyV1PuXQKOvOwhMNqZIq5hluzHP2pMgnOmHEo7kPdI2mw==", + "dependencies": [ + "zod" + ] }, - "jsr": { - "@david/dax@0.41.0": { - "integrity": "9e1ecf66a0415962cc8ad3ba4e3fa93ce0f1a1cc797dd95c36fdfb6977dc7fc8", - "dependencies": [ - "jsr:@david/which@^0.4.1", - "jsr:@std/fmt@^0.221.0", - "jsr:@std/fs@0.221.0", - "jsr:@std/io@0.221.0", - "jsr:@std/path@0.221.0", - "jsr:@std/streams@0.221.0" - ] - }, - "@david/which@0.4.1": { - "integrity": "896a682b111f92ab866cc70c5b4afab2f5899d2f9bde31ed00203b9c250f225e" - }, - "@std/assert@0.221.0": { - "integrity": "a5f1aa6e7909dbea271754fd4ab3f4e687aeff4873b4cef9a320af813adb489a" - }, - "@std/bytes@0.221.0": { - "integrity": "64a047011cf833890a4a2ab7293ac55a1b4f5a050624ebc6a0159c357de91966" - }, - "@std/fmt@0.221.0": { - "integrity": "379fed69bdd9731110f26b9085aeb740606b20428ce6af31ef6bd45ef8efa62a" - }, - "@std/fs@0.221.0": { - "integrity": "028044450299de8ed5a716ade4e6d524399f035513b85913794f4e81f07da286", - "dependencies": [ - "jsr:@std/assert@^0.221.0", - "jsr:@std/path@^0.221.0" - ] - }, - "@std/io@0.221.0": { - "integrity": "faf7f8700d46ab527fa05cc6167f4b97701a06c413024431c6b4d207caa010da", - "dependencies": [ - "jsr:@std/assert@^0.221.0", - "jsr:@std/bytes@^0.221.0" - ] - }, - "@std/path@0.221.0": { - "integrity": "0a36f6b17314ef653a3a1649740cc8db51b25a133ecfe838f20b79a56ebe0095", - "dependencies": [ - "jsr:@std/assert@^0.221.0" - ] - }, - "@std/streams@0.221.0": { - "integrity": "47f2f74634b47449277c0ee79fe878da4424b66bd8975c032e3afdca88986e61", - "dependencies": [ - "jsr:@std/io@^0.221.0" - ] - } + "zod-validation-error@3.4.0_zod@3.23.8": { + "integrity": "sha512-ZOPR9SVY6Pb2qqO5XHt+MkkTRxGXb4EVtnjc9JpXUOtUB1T9Ru7mZOT361AN3MsetVe7R0a1KZshJDZdgp9miQ==", + "dependencies": [ + "zod" + ] }, - "npm": { - "@noble/hashes@1.4.0": { - "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", - "dependencies": {} - }, - "multiformats@13.1.0": { - "integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ==", - "dependencies": {} - }, - "zod-validation-error@3.3.0_zod@3.23.8": { - "integrity": "sha512-Syib9oumw1NTqEv4LT0e6U83Td9aVRk9iTXPUQr1otyV1PuXQKOvOwhMNqZIq5hluzHP2pMgnOmHEo7kPdI2mw==", - "dependencies": { - "zod": "zod@3.23.8" - } - }, - "zod-validation-error@3.4.0_zod@3.23.8": { - "integrity": "sha512-ZOPR9SVY6Pb2qqO5XHt+MkkTRxGXb4EVtnjc9JpXUOtUB1T9Ru7mZOT361AN3MsetVe7R0a1KZshJDZdgp9miQ==", - "dependencies": { - "zod": "zod@3.23.8" - } - }, - "zod@3.23.8": { - "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", - "dependencies": {} - } + "zod@3.23.8": { + "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==" } }, "remote": { @@ -439,6 +434,8 @@ "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/modules/tasks/types.ts": "072a34bd0749428bad4d612cc86abe463d4d4f74dc56cf0a48a1f41650e2399b", "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/modules/types.ts": "c0f212b686a2721d076e9aeb127596c7cbc939758e2cc32fd1d165a8fb320a87", "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/port.ts": "c039a010dee7dfd978478cf4c5e2256c643135e10f33c30a09f8db9915e9d89d", + "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/ports/act.ts": "2ce6b8fddf61db12ba69b7cad6985237a2962ca79853edbddee5bfb49c47d1ab", + "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/ports/deno_ghrel.ts": "eca02a93ceb62ad9fb7f395361d32da0d5657aba5f7856c8ae0109135da0e070", "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/setup_logger.ts": "f8a206bda0595497d6f4718032d4a959000b32ef3346d4b507777eec6a169458", "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/utils/logger.ts": "fcbafb35ae4b812412b9b301ce6d06b8b9798f94ebebe3f92677e25e4b19af3c", "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/utils/mod.ts": "25901b5a03625353cc0d9c024daca806eb2513b153faede5ecad73b428542721", diff --git a/README.md b/README.md index 809c7aa..99ae284 100644 --- a/README.md +++ b/README.md @@ -151,7 +151,6 @@ Run the tests in the repository through the deno task: ```bash $ deno task test +# this supports filtering +$ deno task test --filter envHooks ``` - -Most tests are isolated from each other using containers. -Set `$GHJK_TEST_E2E_TYPE` to `local` to use the local test runner. diff --git a/modules/ports/mod.ts b/modules/ports/mod.ts index 4221e65..99d6d5c 100644 --- a/modules/ports/mod.ts +++ b/modules/ports/mod.ts @@ -142,7 +142,7 @@ export class PortsModule extends ModuleBase { updateInstall: { short: "u", long: "update-install", - value_name: "INSTALL_ID", + value_name: "INSTALL ID", }, updateAll: { short: "a", @@ -157,7 +157,7 @@ export class PortsModule extends ModuleBase { gcx, pcx, updateInstall as string | undefined, - updateAll as string | undefined, + updateAll as boolean | undefined, ); }, }, @@ -203,7 +203,7 @@ async function outdatedCommand( gcx: GhjkCtx, pcx: PortsCtx, updateInstallFlag?: string, - updateAllFlag?: string, + updateAllFlag?: boolean, ) { const envsCtx = getEnvsCtx(gcx); const envName = envsCtx.activeEnv; diff --git a/src/deno_systems/types.ts b/src/deno_systems/types.ts index 2cc7273..2093aeb 100644 --- a/src/deno_systems/types.ts +++ b/src/deno_systems/types.ts @@ -80,7 +80,8 @@ const flagsAndArgs = zod.record( zod.union([ zod.string(), zod.string().array(), - zod.string().array().array(), + zod.number(), + zod.boolean(), ]).optional(), ); @@ -114,13 +115,6 @@ export type DenoSystemsRoot = { systems: Record; }; -export type CommandAction = ( - args: { - flags: Record; - args: Record; - }, -) => Promise | void; - export type CliCommand = zod.input & { sub_commands?: CliCommand[]; }; diff --git a/src/ghjk/host/hashfile.rs b/src/ghjk/host/hashfile.rs index be4d03e..0fc30ad 100644 --- a/src/ghjk/host/hashfile.rs +++ b/src/ghjk/host/hashfile.rs @@ -135,7 +135,7 @@ async fn file_digests( .into_iter() .map(|path| { async move { - let path = tokio::fs::canonicalize(path).await?; + let path = std::path::absolute(path)?; let hash = file_digest_hash(hcx, &path).await?; let relative_path = pathdiff::diff_paths(path, &hcx.config.cwd).unwrap(); Ok((relative_path, hash)) diff --git a/src/ghjk/systems/deno.rs b/src/ghjk/systems/deno.rs index c692ce0..79b488d 100644 --- a/src/ghjk/systems/deno.rs +++ b/src/ghjk/systems/deno.rs @@ -294,7 +294,7 @@ impl SystemInstance for DenoSystemInstance { let cmds = cmds .into_iter() - .map(|cmd| cmd.into_clap(self.scx.clone())) + .map(|cmd| cmd.convert(self.scx.clone())) .collect(); Ok(cmds) diff --git a/src/ghjk/systems/deno/cli.rs b/src/ghjk/systems/deno/cli.rs index 9692d5b..5790958 100644 --- a/src/ghjk/systems/deno/cli.rs +++ b/src/ghjk/systems/deno/cli.rs @@ -23,7 +23,7 @@ pub struct CliCommandDesc { impl CliCommandDesc { #[tracing::instrument(skip(scx))] - pub fn into_clap(self, scx: super::DenoSystemsContext) -> crate::systems::SystemCliCommand { + pub fn convert(self, scx: super::DenoSystemsContext) -> crate::systems::SystemCliCommand { let name = self.name; let mut cmd = clap::Command::new(name.clone()).name(name.clone()); @@ -45,29 +45,32 @@ impl CliCommandDesc { if let Some(val) = self.before_long_help { cmd = cmd.before_long_help(val) } - - if let Some(val) = self.args { - for (id, desc) in val { - let arg = desc.into_clap(id); - cmd = cmd.arg(arg); - } - } - let flag_ids = if let Some(val) = self.flags { + let flag_ids = if let Some(val) = &self.flags { let mut ids = ahash::HashSet::default(); for (id, desc) in val { ids.insert(id.clone()); - let arg = desc.into_clap(id); + let arg = desc.convert(id); cmd = cmd.arg(arg); } ids } else { default() }; + + if let Some(val) = &self.args { + for (id, desc) in val { + if flag_ids.contains(id) { + panic!("flag and arg id clash at {id}"); + } + let arg = desc.convert(id); + cmd = cmd.arg(arg); + } + } let sub_commands = if let Some(val) = self.sub_commands { let mut subcommands = IndexMap::new(); for desc in val { let id = desc.name.clone(); - let scmd = desc.into_clap(scx.clone()); + let scmd = desc.convert(scx.clone()); subcommands.insert(id.into(), scmd); } subcommands @@ -76,13 +79,17 @@ impl CliCommandDesc { }; let action: Option = if let Some(val) = self.action_cb_key { - let flag_ids = Arc::new(flag_ids); let cb_key = CHeapStr::from(val); + let flags = self.flags.unwrap_or_default(); + let flags = Arc::new(flags); + let args = self.args.unwrap_or_default(); + let args = Arc::new(args); Some(Box::new(move |matches| { let scx = scx.clone(); - let flag_ids = flag_ids.clone(); let cb_key = cb_key.clone(); - deno_cb_action(matches, scx.clone(), cb_key, flag_ids).boxed() + let flags = flags.clone(); + let args = args.clone(); + deno_cb_action(matches, scx.clone(), cb_key, flags, args).boxed() })) } else { /* if sub_commands.is_empty() { @@ -104,7 +111,8 @@ async fn deno_cb_action( mut matches: clap::ArgMatches, scx: super::DenoSystemsContext, cb_key: CHeapStr, - flag_ids: Arc>, + flag_descs: Arc>, + args_descs: Arc>, ) -> Res<()> { let mut flags = IndexMap::new(); let mut args = IndexMap::new(); @@ -115,22 +123,41 @@ async fn deno_cb_action( .collect::>() .into_iter(); for id in match_ids { - let Some(value) = matches - .try_remove_occurrences::(id.as_str()) - .wrap_err_with(|| format!("error extracting match occurunce for {id}"))? + let Some(desc) = flag_descs + .get(&id) + .map(|flag| &flag.arg) + .or_else(|| args_descs.get(&id)) else { - continue; + unreachable!("unspecified arg id found: {id}"); }; - let value: Vec> = value.map(Iterator::collect).collect(); - let value = if value.len() == 1 && value[0].len() < 2 { - serde_json::json!(value.first()) - } else if value.len() == 1 { - serde_json::json!(value[0]) - } else { - serde_json::json!(value) + let value = match desc.action.unwrap_or(ArgActionSerde::Set) { + ArgActionSerde::Set => matches + .try_remove_one::(id.as_str()) + .wrap_err_with(|| format!("error extracting match string for {id}"))? + .map(|val| serde_json::json!(val)), + ArgActionSerde::Append => matches + .try_remove_many::(id.as_str()) + .wrap_err_with(|| format!("error extracting match bool for {id}"))? + .map(|vals| vals.collect::>()) + .map(|val| serde_json::json!(val)), + ArgActionSerde::SetTrue | ArgActionSerde::SetFalse => matches + .try_remove_one::(id.as_str()) + .wrap_err_with(|| format!("error extracting match bool for {id}"))? + .map(|val| serde_json::json!(val)), + ArgActionSerde::Count => matches + .try_remove_one::(id.as_str()) + .wrap_err_with(|| format!("error extracting match count for {id}"))? + .map(|val| serde_json::json!(val)), + ArgActionSerde::Help + | ArgActionSerde::HelpShort + | ArgActionSerde::HelpLong + | ArgActionSerde::Version => unreachable!(), + }; + let Some(value) = value else { + continue; }; - let bucket = if flag_ids.contains(id.as_str()) { + let bucket = if flag_descs.contains_key(id.as_str()) { &mut flags } else { &mut args @@ -183,8 +210,8 @@ pub struct CliArgDesc { } impl CliArgDesc { - pub fn into_clap(self, id: String) -> clap::Arg { - let mut arg = clap::Arg::new(id); + pub fn convert(&self, id: &str) -> clap::Arg { + let mut arg = clap::Arg::new(id.to_owned()); if let Some(val) = self.required { arg = arg.required(val) @@ -209,7 +236,7 @@ impl CliArgDesc { arg = arg.action(clap::ArgAction::from(val)) } - if let Some(val) = self.value_name { + if let Some(val) = &self.value_name { arg = arg.value_name(val) } @@ -217,35 +244,35 @@ impl CliArgDesc { arg = arg.value_hint(clap::ValueHint::from(val)) } - if let Some(val) = self.long { + if let Some(val) = &self.long { arg = arg.long(val) } - if let Some(val) = self.long_aliases { + if let Some(val) = &self.long_aliases { arg = arg.aliases(val) }; - if let Some(val) = self.visible_long_aliases { + if let Some(val) = &self.visible_long_aliases { arg = arg.visible_aliases(val) }; if let Some(val) = self.short { arg = arg.short(val) }; - if let Some(val) = self.short_aliases { - arg = arg.short_aliases(val) + if let Some(val) = &self.short_aliases { + arg = arg.short_aliases(val.clone()) }; - if let Some(val) = self.visible_short_aliases { - arg = arg.short_aliases(val) + if let Some(val) = &self.visible_short_aliases { + arg = arg.short_aliases(val.clone()) }; - if let Some(val) = self.env { + if let Some(val) = &self.env { arg = arg.env(val) }; - if let Some(val) = self.help { + if let Some(val) = &self.help { arg = arg.help(val) }; - if let Some(val) = self.long_help { + if let Some(val) = &self.long_help { arg = arg.long_help(val) }; @@ -269,34 +296,34 @@ pub struct CliFlagDesc { } impl CliFlagDesc { - pub fn into_clap(self, id: String) -> clap::Arg { - let mut arg = self.arg.into_clap(id); + pub fn convert(&self, id: &str) -> clap::Arg { + let mut arg = self.arg.convert(id); - if let Some(val) = self.long { + if let Some(val) = &self.long { arg = arg.long(val) } - if let Some(val) = self.long_aliases { + if let Some(val) = &self.long_aliases { arg = arg.aliases(val) }; - if let Some(val) = self.visible_long_aliases { + if let Some(val) = &self.visible_long_aliases { arg = arg.visible_aliases(val) }; if let Some(val) = self.short { arg = arg.short(val) }; - if let Some(val) = self.short_aliases { - arg = arg.short_aliases(val) + if let Some(val) = &self.short_aliases { + arg = arg.short_aliases(val.clone()) }; - if let Some(val) = self.visible_short_aliases { - arg = arg.short_aliases(val) + if let Some(val) = &self.visible_short_aliases { + arg = arg.short_aliases(val.clone()) }; arg } } -#[derive(Deserialize, Debug)] +#[derive(Deserialize, Debug, Clone, Copy)] pub enum ValueHintSerde { Unknown, Other, @@ -334,7 +361,7 @@ impl From for clap::ValueHint { } } -#[derive(Deserialize, Debug)] +#[derive(Deserialize, Debug, Clone, Copy)] pub enum ArgActionSerde { Set, Append, diff --git a/tests/envHooks.ts b/tests/envHooks.ts index 963ea07..936984c 100644 --- a/tests/envHooks.ts +++ b/tests/envHooks.ts @@ -60,9 +60,7 @@ const cases: CustomE2eTestCase[] = [ // -s: read from stdin // -l: login mode // -i: make it interactive - ePoint: Deno.env.get("GHJK_TEST_E2E_TYPE") == "local" - ? `bash --rcfile $BASH_ENV -si` // we don't want to use the system rcfile - : `bash -sil`, + ePoint: `bash --rcfile $BASH_ENV -si`, // we don't want to use the system rcfile stdin: posixInteractiveScript, }, { diff --git a/tests/ports.ts b/tests/ports.ts index 2d8b0a9..e4fe16f 100644 --- a/tests/ports.ts +++ b/tests/ports.ts @@ -150,14 +150,7 @@ const cases: CustomE2eTestCase[] = [ ports.meta_cli_ghrel({ full: true }), ports.wasmedge(), ], - ePoint: Deno.env.get("GHJK_TEST_E2E_TYPE") != "local" - // meta cli runs into segmentation error in the alpine - // image - // https://github.com/metatypedev/metatype/issues/584 - // just check that the shell's able to find the - // executrable - ? `which meta && wasmedge --version` - : `meta --version && wasmedge --version`, + ePoint: `which meta && wasmedge --version`, ignore: testTargetPlatform == "linux/aarch64", }, // 80 meg diff --git a/tests/reloadHooks.ts b/tests/reloadHooks.ts index fda6298..c9be1ba 100644 --- a/tests/reloadHooks.ts +++ b/tests/reloadHooks.ts @@ -208,9 +208,8 @@ type CustomE2eTestCase = Omit & { // -s: read from stdin // -l: login mode // -i: interactive mode -const bashInteractiveEpoint = Deno.env.get("GHJK_TEST_E2E_TYPE") == "local" - ? `bash --rcfile $BASH_ENV -si` // we don't want to use the system rcfile - : `bash -sil`; +// we don't want to use the system rcfile +const bashInteractiveEpoint = `bash --rcfile $BASH_ENV -si`; const cases: CustomE2eTestCase[] = [ { diff --git a/tests/utils.ts b/tests/utils.ts index 6438f32..f02d6a7 100644 --- a/tests/utils.ts +++ b/tests/utils.ts @@ -74,10 +74,10 @@ exec ${ghjkExePath.resolve().toString()} "$@"`, shellsToHook: [], }); - await $`ghjk print config` + /* await $`ghjk print config` .cwd(tmpDir.toString()) .clearEnv() - .env(env); + .env(env); */ await $`ghjk envs cook` .cwd(tmpDir.toString()) .clearEnv()