greghendershott / frog

Frog is a static blog generator implemented in Racket, targeting Bootstrap and able to use Pygments.
916 stars 96 forks source link

Using `raco frog` in non-frog directory prints internal error #204

Closed takikawa closed 6 years ago

takikawa commented 6 years ago

Here's a minor bug I encountered when I ran raco frog by accident in a non-frog project. This command-line interaction illustrates the issue:

$ cd /tmp
$ mkdir foobar
$ cd foobar
$ raco frog
Frog 0.29
Creating frog.rkt from .frogrc -- see upgrade documentation.
file-size: cannot get size
  path: /tmp/foobar/.frogrc
  system error: No such file or directory; errno=2
  context...:
   /home/asumu/plt/racket-git/racket/collects/racket/file.rkt:720:0: file->string113
   /home/asumu/plt/racket-git/racket/share/pkgs/frog/frog/private/upgrade/old-config.rkt:68:0: add-deprecation-comment-to-.frogrc
   /home/asumu/plt/racket-git/racket/share/pkgs/frog/frog/private/main.rkt:41:0: main
   (submod /home/asumu/plt/racket-git/racket/share/pkgs/frog/frog/main.rkt main): [running body]
   /home/asumu/plt/racket-git/racket/collects/raco/raco.rkt: [running body]
   /home/asumu/plt/racket-git/racket/collects/raco/main.rkt: [running body]

This also writes frog.rkt into the directory.

greghendershott commented 6 years ago

Only reading this online, but, this sounds in the same ballpark as PR #203 -- which I'm way behind on reviewing. But possibly that PR might address just the special case of --help -- and I should make a fuller fix.