@@ -2,7 +2,7 @@ import { TileMatrixSets } from '@basemaps/geo';
22import { fsa , isArgo , LogType , Url , UrlArrayJsonFile } from '@basemaps/shared' ;
33import { CliId , CliInfo } from '@basemaps/shared/build/cli/info.js' ;
44import { getLogger , logArguments } from '@basemaps/shared/build/cli/log.js' ;
5- import { command , option , string } from 'cmd-ts' ;
5+ import { command , option , optional , string } from 'cmd-ts' ;
66import { mkdirSync } from 'fs' ;
77import { basename } from 'path' ;
88import { createGzip } from 'zlib' ;
@@ -97,9 +97,9 @@ export const JoinArgs = {
9797 defaultValueIsSerializable : true ,
9898 } ) ,
9999 target : option ( {
100- type : Url ,
100+ type : optional ( Url ) ,
101101 long : 'target' ,
102- description : 'Path of target location, could be local or s3' ,
102+ description : 'Path of target location to upload the processed file , could be local or s3' ,
103103 } ) ,
104104} ;
105105
@@ -148,7 +148,7 @@ export const JoinCommand = command({
148148 logger . info ( { target : bucketPath , tileMatrix : tileMatrix . identifier } , 'Upload: End' ) ;
149149
150150 // Write output target for argo tasks to create pull request
151- if ( isArgo ( ) ) {
151+ if ( isArgo ( ) && args . target ) {
152152 const target = new URL ( `topographic/${ CliId } /${ args . filename } .tar.co` , bucketPath ) ;
153153 await fsa . write ( fsa . toUrl ( '/tmp/target' ) , JSON . stringify ( [ target ] ) ) ;
154154 }
0 commit comments