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

feat: add open flag to dfx deploy command #3618

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

filippofinke
Copy link

Description

This pull request adds a new feature to the dfx deploy command where users can specify the --open flag to automatically open the URL of the deployed canisters in the default browser of the machine. This enhancement aims to improve user experience by providing a convenient way to access the deployed canisters immediately after deployment.

How Has This Been Tested?

To test this feature:

  • Ensure the dfx command-line tool is installed and configured properly.
  • Run the dfx deploy --open command with a project that has deployable canisters.
  • Verify that after deployment, the default browser opens with the URL of the deployed canisters.

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@sa-github-api
Copy link

Dear @filippofinke,

In order to potentially merge your code in this open-source repository and therefore proceed with your contribution, we need to have your approval on DFINITY's CLA.

If you decide to agree with it, please visit this issue and read the instructions there. Once you have signed it, re-trigger the workflow on this PR to see if your code can be merged.

— The DFINITY Foundation

CHANGELOG.md Outdated Show resolved Hide resolved

if open_in_browser {
if let Err(e) = webbrowser::open(url.as_str()) {
info!(log, "Failed to open browser: {}", e);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
info!(log, "Failed to open browser: {}", e);
error!(log, "Failed to open browser: {}", e);


if open_in_browser {
if let Err(e) = webbrowser::open(url.as_str()) {
info!(log, "Failed to open browser: {}", e);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
info!(log, "Failed to open browser: {}", e);
error!(log, "Failed to open browser: {}", e);

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

Successfully merging this pull request may close these issues.

None yet

3 participants