Skip to content

Commit

Permalink
chore: fix wrangler setup
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Oct 4, 2024
1 parent 8296a4e commit cf4c8e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deploy/setup-kv-namespace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async function main() {
// Check if the namespace exists or create a new one
let namespaceId: string;
try {
const res = execSync(`wrangler kv:namespace create ${NAMESPACE_TITLE}`).toString();
const res = execSync(`wrangler kv namespace create ${NAMESPACE_TITLE}`).toString();
console.log(res);
const newId = res.match(/id = \s*"([^"]+)"/)?.[1];
if (!newId) {
Expand All @@ -86,7 +86,7 @@ async function main() {
console.log(`Namespace created with ID: ${namespaceId}`);
} catch (error) {
console.error(error);
const listOutput = JSON.parse(execSync(`wrangler kv:namespace list`).toString()) as Namespace[];
const listOutput = JSON.parse(execSync(`wrangler kv namespace list`).toString()) as Namespace[];
const existingNamespace = listOutput.find((o) => o.title === NAMESPACE_TITLE_WITH_PREFIX);
if (!existingNamespace) {
throw new Error(`Error creating namespace: ${error}`);
Expand Down

0 comments on commit cf4c8e0

Please sign in to comment.