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

Mixed source and dest file using uberscripts blanks files #1489

Closed
anderspersson opened this issue Feb 9, 2023 · 3 comments · Fixed by #1503
Closed

Mixed source and dest file using uberscripts blanks files #1489

anderspersson opened this issue Feb 9, 2023 · 3 comments · Fixed by #1503

Comments

@anderspersson
Copy link

anderspersson commented Feb 9, 2023

I know did not use the tool correct, but feel is dangerus it wipes a sourcefile!

version
babashka v1.1.173

platform
Windows 11

problem
Tested the Unberscript and mixed source and dest file witch did blank my sourcefile.
, mabe should give warning that a file with data exits ?

Directory: C:\test\bb_test

Filename: 
-a----        2023-02-09     14:32             70 source.clj

bb uberscript .\source.clj

Result:

-a----        2023-02-09     15:11              0 source.clj

@borkdude
Copy link
Collaborator

borkdude commented Feb 9, 2023

Yes, I think you're right

@bobisageek
Copy link
Contributor

Just a backward-compatibility question - would the plan be for the warning to actually prevent the overwrite, or just like a notice that "[filename] is about to be overwritten"? I ask because people that might be rebuilding an uberscript when they make changes could be surprised by a change in behavior (presumably having to delete or empty the target file before running their uberscript build).

@borkdude
Copy link
Collaborator

@bobisageek I think we should not overwrite source files, or maybe any file that doesn't end with .jar. Overwriting a previous uberjar is fine, I think.

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.

3 participants