Skip to content

Commit

Permalink
enhance/hurl: remove depreciated --fail-at-end option
Browse files Browse the repository at this point in the history
  • Loading branch information
bp7968h committed Nov 30, 2024
1 parent 5649b4f commit 836ecf6
Show file tree
Hide file tree
Showing 14 changed files with 3 additions and 68 deletions.
1 change: 0 additions & 1 deletion completions/_hurl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ _hurl() {
'--curl[Export each request to a list of curl commands]: :_files' \
'--delay[Sets delay before each request]: :' \
'--error-format[Control the format of error messages]: :' \
'--fail-at-end[Fail at end]' \
'--file-root[Set root directory to import files \[default: input file directory\]]: :' \
'(-L --location)'{-L,--location}'[Follow redirects]' \
'--location-trusted[Follow redirects but allows sending the name + password to all hosts that the site may redirect to]' \
Expand Down
1 change: 0 additions & 1 deletion completions/_hurl.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ Register-ArgumentCompleter -Native -CommandName 'hurl' -ScriptBlock {
[CompletionResult]::new('--curl', 'curl', [CompletionResultType]::ParameterName, 'Export each request to a list of curl commands')
[CompletionResult]::new('--delay', 'delay', [CompletionResultType]::ParameterName, 'Sets delay before each request')
[CompletionResult]::new('--error-format', 'error-format', [CompletionResultType]::ParameterName, 'Control the format of error messages')
[CompletionResult]::new('--fail-at-end', 'fail-at-end', [CompletionResultType]::ParameterName, 'Fail at end')
[CompletionResult]::new('--file-root', 'file-root', [CompletionResultType]::ParameterName, 'Set root directory to import files [default: input file directory]')
[CompletionResult]::new('--location', 'location', [CompletionResultType]::ParameterName, 'Follow redirects')
[CompletionResult]::new('--location-trusted', 'location-trusted', [CompletionResultType]::ParameterName, 'Follow redirects but allows sending the name + password to all hosts that the site may redirect to')
Expand Down
2 changes: 1 addition & 1 deletion completions/hurl.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ _hurl()
_init_completion || return

if [[ $cur == -* ]]; then
COMPREPLY=($(compgen -W '--aws-sigv4 --cacert --cert --key --color --compressed --connect-timeout --connect-to --continue-on-error --cookie --cookie-jar --curl --delay --error-format --fail-at-end --file-root --location --location-trusted --from-entry --glob --http1.0 --http1.1 --http2 --http3 --ignore-asserts --include --insecure --interactive --ipv4 --ipv6 --jobs --json --limit-rate --max-filesize --max-redirs --max-time --netrc --netrc-file --netrc-optional --no-color --no-output --noproxy --output --parallel --path-as-is --proxy --repeat --report-html --report-json --report-junit --report-tap --resolve --retry --retry-interval --ssl-no-revoke --test --to-entry --unix-socket --user --user-agent --variable --variables-file --verbose --very-verbose --help --version' -- "$cur"))
COMPREPLY=($(compgen -W '--aws-sigv4 --cacert --cert --key --color --compressed --connect-timeout --connect-to --continue-on-error --cookie --cookie-jar --curl --delay --error-format --file-root --location --location-trusted --from-entry --glob --http1.0 --http1.1 --http2 --http3 --ignore-asserts --include --insecure --interactive --ipv4 --ipv6 --jobs --json --limit-rate --max-filesize --max-redirs --max-time --netrc --netrc-file --netrc-optional --no-color --no-output --noproxy --output --parallel --path-as-is --proxy --repeat --report-html --report-json --report-junit --report-tap --resolve --retry --retry-interval --ssl-no-revoke --test --to-entry --unix-socket --user --user-agent --variable --variables-file --verbose --very-verbose --help --version' -- "$cur"))
return
fi

Expand Down
1 change: 0 additions & 1 deletion completions/hurl.fish
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ complete -c hurl -l cookie-jar -d 'Write cookies to FILE after running the sessi
complete -c hurl -l curl -d 'Export each request to a list of curl commands'
complete -c hurl -l delay -d 'Sets delay before each request'
complete -c hurl -l error-format -d 'Control the format of error messages'
complete -c hurl -l fail-at-end -d 'Fail at end'
complete -c hurl -l file-root -d 'Set root directory to import files [default: input file directory]'
complete -c hurl -l location -d 'Follow redirects'
complete -c hurl -l location-trusted -d 'Follow redirects but allows sending the name + password to all hosts that the site may redirect to'
Expand Down
7 changes: 0 additions & 7 deletions docs/spec/options/hurl/fail_at_end.option

This file was deleted.

17 changes: 0 additions & 17 deletions integration/hurl/tests_failed/fail_at_end.err

This file was deleted.

1 change: 0 additions & 1 deletion integration/hurl/tests_failed/fail_at_end.exit

This file was deleted.

9 changes: 0 additions & 9 deletions integration/hurl/tests_failed/fail_at_end.hurl

This file was deleted.

3 changes: 0 additions & 3 deletions integration/hurl/tests_failed/fail_at_end.ps1

This file was deleted.

8 changes: 0 additions & 8 deletions integration/hurl/tests_failed/fail_at_end.py

This file was deleted.

3 changes: 0 additions & 3 deletions integration/hurl/tests_failed/fail_at_end.sh

This file was deleted.

9 changes: 0 additions & 9 deletions packages/hurl/src/cli/options/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,6 @@ pub fn error_format() -> clap::Arg {
.num_args(1)
}

pub fn fail_at_end() -> clap::Arg {
clap::Arg::new("fail_at_end")
.long("fail-at-end")
.help("Fail at end")
.help_heading("Run options")
.action(clap::ArgAction::SetTrue)
.hide(true)
}

pub fn file_root() -> clap::Arg {
clap::Arg::new("file_root")
.long("file-root")
Expand Down
4 changes: 0 additions & 4 deletions packages/hurl/src/cli/options/matches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ pub fn connects_to(arg_matches: &ArgMatches) -> Vec<String> {
}

pub fn continue_on_error(arg_matches: &ArgMatches) -> bool {
if has_flag(arg_matches, "fail_at_end") {
eprintln!("The option fail-at-end is deprecated. Use continue-on-error instead");
return true;
}
has_flag(arg_matches, "continue_on_error")
}

Expand Down
5 changes: 2 additions & 3 deletions packages/hurl/src/cli/options/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,8 @@ pub fn parse() -> Result<CliOptions, CliOptionsError> {
.arg(commands::glob())
.arg(commands::netrc())
.arg(commands::netrc_file())
.arg(commands::netrc_optional())
// Deprecated options
.arg(commands::fail_at_end());
.arg(commands::netrc_optional());

let arg_matches = command.try_get_matches_from_mut(env::args_os())?;

// If we've no file input (either from the standard input or from the command line arguments),
Expand Down

0 comments on commit 836ecf6

Please sign in to comment.