Skip to content

Commit

Permalink
Save VALIDIUM_MODE env in dev.env
Browse files Browse the repository at this point in the history
  • Loading branch information
ilitteri committed Jan 30, 2024
1 parent bf32093 commit 908097d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion infrastructure/zk/src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import * as run from './run/run';
import * as server from './server';
import { up } from './up';

import * as fs from 'fs';

const entry = chalk.bold.yellow;
const announce = chalk.yellow;
const success = chalk.green;
Expand All @@ -27,7 +29,9 @@ export async function init(initArgs: InitArgs = DEFAULT_ARGS) {
validiumMode
} = initArgs;

process.env.VALIDIUM_MODE = validiumMode.toString();
let envFileContent = fs.readFileSync(process.env.ENV_FILE!).toString();
envFileContent += `VALIDIUM_MODE=${validiumMode}\n`;
fs.writeFileSync(process.env.ENV_FILE!, envFileContent);
await announced(`Initializing in ${validiumMode ? 'Validium mode' : 'Roll-up mode'}`);

if (!process.env.CI && !skipEnvSetup) {
Expand Down

0 comments on commit 908097d

Please sign in to comment.