Skip to content

Commit

Permalink
refactor: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Feb 20, 2022
1 parent c18a0d6 commit 884d34d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions cli/run/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { env } from 'process';
import type { MergedRollupOptions } from '../../src/rollup/types';
import { isWatchEnabled } from '../../src/utils/options/mergeOptions';
import { getAliasName } from '../../src/utils/relativeId';
Expand Down Expand Up @@ -48,11 +49,7 @@ export default async function runRollup(command: Record<string, any>): Promise<v
environment.forEach((arg: string) => {
arg.split(',').forEach((pair: string) => {
const [key, ...value] = pair.split(':');
if (value.length) {
process.env[key] = value.join(':');
} else {
process.env[key] = String(true);
}
env[key] = value.length === 0 ? String(true) : value.join(':');
});
});
}
Expand Down

0 comments on commit 884d34d

Please sign in to comment.