File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ const fs: typeof fsType = require('fs');
4646 // Special case: -v or --version with no other parameters
4747 const onlyVersion = ( args . length === 1 && ( args [ 0 ] === '-v' || args [ 0 ] === '--version' ) ) ;
4848 if ( hasFlag ( 'version' ) || onlyVersion ) {
49- console . log ( 'v0.1.1 ' ) ;
49+ console . log ( 'v0.1.2 ' ) ;
5050 return ;
5151 }
5252
@@ -86,6 +86,10 @@ const fs: typeof fsType = require('fs');
8686 // Browser setup
8787 const startTime = Date . now ( ) ;
8888 log ( "Started: " + new Date ( ) . toLocaleString ( ) ) ;
89+ if ( ! force && outputFile !== '-' && fs . existsSync ( outputFile ) ) {
90+ console . error ( `Output file '${ outputFile } ' already exists. Use --force or -f to overwrite.` ) ;
91+ process . exit ( 2 ) ;
92+ }
8993 log ( `Navigating to ${ url } ` ) ;
9094 const launchOpts : puppeteerType . LaunchOptions & Record < string , any > = headless
9195 ? { headless : true }
Original file line number Diff line number Diff line change 11{
22 "name" : " graphics-error-scraper" ,
3- "version" : " 0.1.1 " ,
3+ "version" : " 0.1.2 " ,
44 "description" : " Scrapes a WebCTRL system to look for graphics errors." ,
55 "license" : " BSD-3-Clause" ,
66 "author" : " Cameron Vogt" ,
You can’t perform that action at this time.
0 commit comments