Unverified Commit 1f6bc347 authored by Alvin Bryan's avatar Alvin Bryan Committed by GitHub

Fixed issues with environment variables for Windows users (#37853)

parent 7f54585f
const spaceImport = require('contentful-import') const spaceImport = require('contentful-import')
const exportFile = require('./export.json') const exportFile = require('./export.json')
const [CONTENTFUL_SPACE_ID, CONTENTFUL_MANAGEMENT_TOKEN] = process.argv.slice(2) const { CONTENTFUL_SPACE_ID, CONTENTFUL_MANAGEMENT_TOKEN } = process.env
if (!CONTENTFUL_SPACE_ID || !CONTENTFUL_MANAGEMENT_TOKEN) { if (!CONTENTFUL_SPACE_ID || !CONTENTFUL_MANAGEMENT_TOKEN) {
throw new Error( throw new Error(
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"dev": "next", "dev": "next",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"setup": "node ./contentful/setup.js $CONTENTFUL_SPACE_ID $CONTENTFUL_MANAGEMENT_TOKEN" "setup": "node ./contentful/setup.js"
}, },
"dependencies": { "dependencies": {
"@contentful/rich-text-react-renderer": "^15.4.0", "@contentful/rich-text-react-renderer": "^15.4.0",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment