sintaxi / surge

CLI for the surge.sh CDN
https://surge.sh
2.87k stars 136 forks source link

Should exit with non-zero status when aborted after permission denied #392

Closed prashant-shahi closed 4 years ago

prashant-shahi commented 4 years ago
$ surge ./

   Running as some-email@gmail.com (Student)

        project: ./
         domain: some-domain.surge.sh

   Aborted - you do not have permission to publish to some-domain.surge.sh
$ echo $?
0
prashant-shahi commented 4 years ago

I went through the source code and found that code logic is throwing exit status 1 when aborted. https://github.com/sintaxi/surge/blob/2ed7d79d683e89d0fc6cd5325cdd9f026d6e7f65/lib/middleware/deploy.js#L315

Turns out, it was because of the command-line fuzzy finder, that I got the zero exit status.