File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,10 @@ export class UploadCommand {
58
58
}
59
59
60
60
async run ( path = './' ) {
61
+ if ( ! fs . existsSync ( fsPath . resolve ( path ) ) ) {
62
+ throw new Error ( `Path ${ path } does not exist. Nothing to upload.` ) ;
63
+ }
64
+
61
65
const gitData = await getGitData ( path ) ;
62
66
const config = findConfig ( path ) ;
63
67
const ttl = this . options . ttl ? new Date ( this . options . ttl ) : undefined ;
Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ import {createCommand} from 'commander';
6
6
7
7
const program = createCommand ( ) ;
8
8
9
+ // Ensure unhandled promises cause the command to fail.
10
+ process . on ( 'unhandledRejection' , err => {
11
+ throw err ;
12
+ } ) ;
13
+
9
14
program
10
15
. command ( 'upload [dir]' )
11
16
. description ( 'Uploads a directory to cloud storage' )
You can’t perform that action at this time.
0 commit comments