-
Notifications
You must be signed in to change notification settings - Fork 4
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
Back to create windows cmd script if symlink creation fails #57
Conversation
This would also need to know about the extension when removing, etc. |
Hi @jolheiser , https://github.com/enr/webman/blob/win-cmd/link/link_windows.go#L34 but I agree with the need to standardize the logic of creating executables (symlink or scripts) names which is now scattered in different functions. |
Hi @jolheiser
I'm not on a windows machine now, I'll try the |
The Do you have a Windows machine that you can't switch to Developer mode? |
Hi @candrewlee14, exactly this: at dayjob I use a windows pc without administrative permissions. |
Makes sense, I'll probably run into use cases like that as well. I think allowing that would be good, but maybe with a warning on the first usage. |
To avoid situations where there might be a mix of symlink and cmd, maybe this should be a configuration setting? That way instead of a fallback it can be consistently applied. |
In this branch both the symlinks and the scripts have the executable name + |
One of the main reasons I drove for symlinks was because I ran into problems where only an exe (symlink) would work, such as a git extension, or using I would personally prefer a config still, but I am not the only voice. 🙂 |
I think a config makes more sense, the symlinks having a .cmd extension is a bit misleading and I think it'd be better to have that more clearly delineated. |
I agree with the configuration. |
The nice thing with a config is that doctor knows the state it should be in and can change accordingly. |
I like that idea from @jolheiser. The format is specified in the config. If at any point you manually change that config, use the doctor. |
This change allows you to use webman even if developer mode has not been enabled in windows:
if symlink creation fails, fallbacks to creating a script named
${executable name minus extension}.cmd
.Could impact #53 (and maybe #11) so, if you were interested in this, it would be necessary to correct the "Windows Symlink check" which I have left untouched right now.