In SourceTree, when attempting to open an old version of a file from the log view I get a Windows Script Host error. The file in question is a JavaScript file and the error details appear to indicate that SourceTree is attempting to execute the file, not open it.
"Error: 'goog' is undefined"
The first line of the file is a goog.provide() call and I am assuming this is causing the error.
SourceTree doesn't open files within itself, it launches whatever process is the operating system "default" for that filetype. On Windows, the default for .js files is usually to execute them.
If this isn't something you do (I've never known anyone to want that), you should be able to set your favorite editor as the default program for .js files to resolve the issue.
I changed the default program in Windows and now it works great. Thanks for the tip!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, interesting. That makes sense it just didn't occur to me that it was based on the Windows default for some reason. I don't know why Windows would set the default to execute JS files...who would want that as the default?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.