Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/commands/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@ export async function runInit() {
initial: false,
});
if (!overwrite) {
console.log(chalk.yellow("✖ Keeping existing apidrift.config.json"));
console.log("");
console.log(" Your current config was not modified. Next steps:");
console.log(
` 1. Make sure you have a ${chalk.cyan(".env")} file with your tokens:`
);
console.log(` ${chalk.gray("STAGING_TOKEN=your_token_here")}`);
console.log(` ${chalk.gray("PROD_TOKEN=your_token_here")}`);
Comment on lines +33 to +38
console.log(
` 2. Add ${chalk.cyan(".env")} to your ${chalk.cyan(".gitignore")} to keep tokens out of git`
);
console.log(
` 3. Run: ${chalk.cyan("apidrift snapshot --tag v1.0 --env staging")}`
);
console.log("");
return;
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/storage/snapshotStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ export function listSnapshots() {
return fs
.readdirSync(SNAP_DIR)
.filter((f) => f.endsWith(".json"))
.map((f) => f.replace(".json", ""));
.map((f) => f.replace(".json", ""))
.sort();
}
Loading