Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Error occurs when trying to "open selected version"

qxfdj92d47lj August 13, 2015

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.

3 answers

1 accepted

4 votes
Answer accepted
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 13, 2015

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.

1 vote
qxfdj92d47lj August 13, 2015

I changed the default program in Windows and now it works great. Thanks for the tip!

0 votes
qxfdj92d47lj August 13, 2015

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?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events