diff --git a/.changeset/wise-dingos-compete.md b/.changeset/wise-dingos-compete.md new file mode 100644 index 000000000..5ac96aa8f --- /dev/null +++ b/.changeset/wise-dingos-compete.md @@ -0,0 +1,5 @@ +--- +"@logto/cli": patch +--- + +use current directory as instance path if no path input for cli diff --git a/packages/cli/src/commands/connector/utils.ts b/packages/cli/src/commands/connector/utils.ts index 40e9e8f42..cd8476f83 100644 --- a/packages/cli/src/commands/connector/utils.ts +++ b/packages/cli/src/commands/connector/utils.ts @@ -53,6 +53,10 @@ const validatePath = async (value: string) => { export const inquireInstancePath = async (initialPath?: string) => { const inquire = async () => { + if (!initialPath && (await validatePath('.')) === true) { + return path.resolve('.'); + } + if (!isTty()) { assert(initialPath, new Error('Path is missing'));