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

"proceed with deployment" default value #652

Closed
r2evans opened this issue Jan 11, 2023 · 3 comments · Fixed by #653
Closed

"proceed with deployment" default value #652

r2evans opened this issue Jan 11, 2023 · 3 comments · Fixed by #653

Comments

@r2evans
Copy link
Contributor

r2evans commented Jan 11, 2023

I might be misreading this, but when I get a warning on app-deployment such as

Do you want to proceed with deployment? [Y/n]: 

I interpret the upper-case Y to be the default value. However, pressing just return in this case defaults to n. With a default of "n" (I am not suggesting changing the default behavior), I expect to see

Do you want to proceed with deployment? [y/N]: 

There is precedence in many unix-based tools.

Barely a question, really really minor. Just a comment on UX. Thanks!

@aronatkins
Copy link
Contributor

Thanks. Looks like we've got two prompts and they've got different defaults, which aren't represented in the "y/n" message appropriately; probably the result of some copy-paste.

When there's a lint error, we want "no" to be the default:

rsconnect/R/deployApp.R

Lines 298 to 304 in 6157c6c

message("The following potential problems were identified in the project files:\n")
printLinterResults(lintResults)
response <- readline("Do you want to proceed with deployment? [Y/n]: ")
if (tolower(substring(response, 1, 1)) != "y") {
message("Cancelling deployment.")
return(invisible(lintResults))
}

When updating, we want "yes" to be the default:

rsconnect/R/deployApp.R

Lines 827 to 833 in 6157c6c

if (!is.null(target$appId) && !is.null(app) && interactive() && !forceUpdate) {
prompt <- paste("Update application currently deployed at\n", app$url,
"? [Y/n] ", sep = "")
input <- readline(prompt)
if (nzchar(input) && !identical(input, "y") && !identical(input, "Y"))
stop("Application deployment cancelled", call. = FALSE)
}

@r2evans
Copy link
Contributor Author

r2evans commented Jan 12, 2023

Do you think that changing the first to [y/N] would be enough and acceptable?

@aronatkins
Copy link
Contributor

@r2evans - yep; that's what i've proposed in #653! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants