Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc cli fixes #396

Merged
merged 2 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/bins/wick/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ dialoguer = { workspace = true, features = ["password"] }
human-panic = { workspace = true }
futures = { workspace = true }
thiserror = { workspace = true }
clap = { workspace = true, features = ["derive", "std"] }
clap = { workspace = true, default-features = true, features = ["derive"] }
nkeys = { workspace = true }
atty = { workspace = true }
jaq-core = { workspace = true, features = ["serde_json"] }
Expand Down
4 changes: 0 additions & 4 deletions crates/bins/wick/src/commands/config/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ pub(crate) struct Options {
#[clap(action)]
pub(crate) path: String,

/// Operation to render.
#[clap(action)]
pub(crate) operation: String,

#[clap(flatten)]
pub(crate) oci: crate::oci::Options,

Expand Down
4 changes: 2 additions & 2 deletions crates/bins/wick/src/commands/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ esac
app_path="{}"

if [ -x "$basedir/wick" ]; then
exec "$basedir/wick" "run" "$app_path" "$@"
exec "$basedir/wick" "run" "$app_path" "--" "$@"
else
exec wick "run" "$app_path" "$@"
exec wick "run" "$app_path" "--" "$@"
fi
"#,
target
Expand Down
6 changes: 1 addition & 5 deletions crates/bins/wick/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,6 @@ async fn async_start() -> Result<(GlobalOptions, StructuredOutput), (GlobalOptio
panic::setup(human_panic::PanicStyle::Human);

let mut args = std::env::args().collect::<Vec<_>>();
// first arg is always the command name, so get the first argument after.
if let Some(first) = args.get(1) {
// If the first real argument contains a dot or any slash, make the default subcommand `wick run`
if first.contains('.') || first.contains('/') || first.contains('\\') {}
}

let matches = <Cli as clap::CommandFactory>::command().try_get_matches_from(&args);
if let Err(e) = matches {
Expand All @@ -201,6 +196,7 @@ async fn async_start() -> Result<(GlobalOptions, StructuredOutput), (GlobalOptio
}
}
}

let mut cli = Cli::parse_from(args);
let options = cli.output.clone();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ impl Transaction {
} else if packet.is_noop() {
// TODO: propagate this and/or its context if it becomes an issue.
} else {
warn!(port = packet.port(), "dropping packet for unconnected port");
debug!(port = packet.port(), "dropping packet for unconnected port");
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl Validator {
let mut walker = SchematicWalker::from_port(schematic, port.detached(), WalkDirection::Down);
let next = walker.nth(1);
if next.is_none() {
warn!(id=node.name.clone(), operation = %reference, port = %field.name, "unhandled downstream connection");
debug!(id=node.name.clone(), operation = %reference, port = %field.name, "unhandled downstream connection");
// validation_errors.push(ValidationError::UnusedOutput {
// port: field.name.clone(),
// id: node.name.clone(),
Expand Down