Skip to content

Commit 6ad2f47

Browse files
committed
Add output path for local system
1 parent c76c22e commit 6ad2f47

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/cli-vector/src/cli/cli.join.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { TileMatrixSets } from '@basemaps/geo';
22
import { fsa, isArgo, LogType, Url, UrlArrayJsonFile } from '@basemaps/shared';
33
import { CliId, CliInfo } from '@basemaps/shared/build/cli/info.js';
44
import { 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';
66
import { mkdirSync } from 'fs';
77
import { basename } from 'path';
88
import { 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
}

packages/cli-vector/src/transform/tippecanoe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export async function tileJoin(inputs: URL[], output: string, logger: LogType):
6767
for (const input of inputs) {
6868
if (input.href.endsWith('mbtiles')) {
6969
cmd.mount(dirname(input.pathname));
70-
cmd.args.push(input.href);
70+
cmd.args.push(input.pathname);
7171
}
7272
}
7373
cmd.args.push('--force');

0 commit comments

Comments
 (0)