Closed ryansb closed 9 years ago
@msoucy
What is the offending commit? And how does it break ofcourse new
?
The addition of the iCal file copying to ofcourse new
in commit 24c34743 causes the new
command to try to copy a nonexistent file.
$ ofcourse new
✔ Glorious README
✔ CSS/Javascript for browser art
✔ Starter Mako templates for great good
Traceback (most recent call last):
File "/home/ryansb/.pyenv/versions/tmpenv-tKdut4PdR0CnD9O/bin/ofcourse", line 9, in <module>
load_entry_point('ofcourse==0.2.1.post21', 'console_scripts', 'ofcourse')()
File "/home/ryansb/.pyenv/versions/tmpenv-tKdut4PdR0CnD9O/lib/python2.7/site-packages/click/core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "/home/ryansb/.pyenv/versions/tmpenv-tKdut4PdR0CnD9O/lib/python2.7/site-packages/click/core.py", line 680, in main
rv = self.invoke(ctx)
File "/home/ryansb/.pyenv/versions/tmpenv-tKdut4PdR0CnD9O/lib/python2.7/site-packages/click/core.py", line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ryansb/.pyenv/versions/tmpenv-tKdut4PdR0CnD9O/lib/python2.7/site-packages/click/core.py", line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ryansb/.pyenv/versions/tmpenv-tKdut4PdR0CnD9O/lib/python2.7/site-packages/click/core.py", line 508, in invoke
return callback(*args, **kwargs)
File "/home/ryansb/code/ofcourse/ofcourse/cli/__init__.py", line 85, in new
os.getcwd(), update=True)
File "/home/ryansb/.pyenv/versions/2.7.9/lib/python2.7/distutils/file_util.py", line 110, in copy_file
"can't copy '%s': doesn't exist or not a regular file" % src)
distutils.errors.DistutilsFileError: can't copy '/home/ryansb/code/ofcourse/ofcourse/course.ics': doesn't exist or not a regular file
lgtm :+1:
Blargh. Whoops, sorry.
LGTM :+1:
Turns out that iCal support breaks the
ofcourse new
command. This PR fixes the command and adds a test to make sure it at least completes successfully.