Closed CNSKnight closed 10 years ago
I don't really understand. Can you paste a file which when run has different output than expected?
Actually running on JavaScripts
Traceback (most recent call last):
File "C:\workspaces_3.7\Marionette.Upgrade\bin\codemod.py", line 813, in <module>
run_interactive(**options)
File "C:\workspaces_3.7\Marionette.Upgrade\bin\codemod.py", line 124, in run_interactive
bookmark = _load_bookmark()
File "C:\workspaces_3.7\Marionette.Upgrade\bin\codemod.py", line 648, in _load_bookmark
return Position(contents)
File "C:\workspaces_3.7\Marionette.Upgrade\bin\codemod.py", line 469, in __init__
% path_and_line_number[0])
ValueError: inappropriately formatted Position string: c:\path\to\something.js:106
and that line 106 will have, so far as I've seen, // a comment
or /* a comment */
either after it or just before it
Ok - I got it. The arg.split():
self.path, line_number_s = arg.split(':')
self.line_number = int(line_number_s)
on the bookmark
test, then excepts on the int()
when the path part itself contains the :
split target char. eg in absolute paths as used in Win environments.
Work-around is to use relative paths when launching codemod.
eg:
And I've seen it err as on the line above that which contains // said comment