Skip to content

Commit

Permalink
update command and add powershell command
Browse files Browse the repository at this point in the history
  • Loading branch information
paritosh-08 committed Feb 6, 2025
1 parent 9841f43 commit 2c0204d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,11 @@ async fn initialize(with_metadata: bool, context: Context<impl Environment>) ->
commands: vec![
("start".to_string(), metadata::CommandDefinition::ShellScript {
bash: "#!/usr/bin/env bash\nset -eu -o pipefail\nHASURA_CONFIGURATION_DIRECTORY=\"$HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH\" ndc-postgres serve".to_string(),
powershell: String::new(),

powershell: "$ErrorActionPreference = \"Stop\"\n$env:HASURA_CONFIGURATION_DIRECTORY=\"$env:HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH\"; & ndc-postgres.exe serve".to_string(),
}),
("update".to_string(), metadata::CommandDefinition::ShellScript {
bash: "#!/usr/bin/env bash\nset -eu -o pipefail\n\"$HOME/.ddn/plugins/bin/hasura-ndc_postgres\" update".to_string(),
powershell: String::new(),
bash: "#!/usr/bin/env bash\nset -eu -o pipefail\n\"$HOME/.ddn/plugins/store/ndc-postgres/$POSTGRES_VERSION/hasura-ndc-postgres\" update".to_string(),
powershell: "$ErrorActionPreference = \"Stop\"\n& \"$env:USERPROFILE\\.ddn\\plugins\\store\\ndc-postgres\\$env:POSTGRES_VERSION\\hasura-ndc-postgres.exe\" update".to_string(),
}),
].into_iter().collect(),
})
Expand Down

0 comments on commit 2c0204d

Please sign in to comment.