File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,9 +27,9 @@ async function run() {
2727 // Mandatory
2828 const dt_upload_api_key = core . getInput ( "DT_UPLOAD_API_KEY" ) ;
2929 const input_binary_path = core . getInput ( "UPLOAD_BINARY_PATH" ) ;
30- const sourcemap_file_path = core . getInput ( "SOURCEMAP_FILE_PATH" ) ;
3130
3231 // Optional
32+ const sourcemap_file_path = core . getInput ( "SOURCEMAP_FILE_PATH" ) ;
3333 const username = core . getInput ( "USERNAME" ) ;
3434 const password = core . getInput ( "PASSWORD" ) ;
3535 const comments = core . getInput ( "COMMENTS" ) ;
@@ -75,7 +75,12 @@ async function run() {
7575 form . append ( "file" , fs . createReadStream ( file_path ) ) ;
7676
7777 if ( sourcemap_file_path ) {
78+ try {
7879 form . append ( "sourcemap" , fs . createReadStream ( sourcemap_file_path ) ) ;
80+ } catch ( err ) {
81+ core . setFailed ( err ) ;
82+ return ;
83+ }
7984 }
8085
8186 // only append optional fields if explicitly set
You can’t perform that action at this time.
0 commit comments