Skip to content

Commit

Permalink
fix(cli): path always ending with /, we need get the name by at(-2). (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentao-Kuang authored Aug 17, 2022
1 parent b22a03a commit 759163f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cli/src/cli/config/action.imagery.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class CommandImageryConfig extends CommandLineAction {

const provider = new ConfigProviderMemory();
const id = ulid();
let name = path.split('/').at(-1);
let name = path.split('/').at(-2);
if (name == null) {
logger.warn({ path, id }, `Unable to extract the imagery name from path, use uild id instead.`);
name = id;
Expand Down

0 comments on commit 759163f

Please sign in to comment.