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

init command - consider highlighting when .vscode/launch.json file overwritten and not updated #754

Open
adamfk opened this issue May 6, 2024 · 2 comments

Comments

@adamfk
Copy link

adamfk commented May 6, 2024

Just a small suggestion.

When running dotnet-script init in a directory that already has a launch.json file with other configurations, I found it a bit surprising that it totally overwrote what I had there:

$ dotnet-script init
Creating VS Code launch configuration file
...'/home/afk/temp/.vscode/launch.json' already exists' [Skipping]
...Use global tool launch config [Updated]
<snip>

I had experience with the tool running as non-global where it used [Updated] to mean modified and not overwritten.

_scriptConsole.WriteHighlighted($"...Fixed path to dotnet-script: '{dotnetScriptPath}' [Updated]");

So maybe changing the wording to something like

 Creating VS Code launch configuration file
 ...'/home/afk/temp/.vscode/launch.json' already exists' [Skipping]
-...Use global tool launch config [Updated]
+...Use global tool launch config [File Overwritten]



One other related small suggestion: maybe only highlight messages like [Updated] instead of [Skipping]. Highlighting the skipping messages (which don't feel important) trains me to ignore the highlights.

So instead of:
image

It would print something like:
image

I'm happy to make a PR, but the changes are very small and might take more effort to review rather than implement.

Thoughts?

@filipw
Copy link
Member

filipw commented May 7, 2024

It would be great if you sent a PR 😄

@adamfk
Copy link
Author

adamfk commented May 8, 2024

Sounds good! There's a few things I need to get done first. I'll start on it in a couple weeks.

Happy to contribute to a project that I really enjoy :)

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

No branches or pull requests

2 participants