jamsocket
Version:
A CLI for the Jamsocket platform
17 lines (16 loc) • 554 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.env = void 0;
const core_1 = require("@oclif/core");
exports.env = core_1.Flags.build({
char: 'e',
description: 'optional environment variables to pass to the container',
multiple: true,
parse: async (input) => {
const match = input.match(/([^=]+)=(.+)/s);
if (!match) {
throw new Error(`Error parsing env flag. Must be in the format KEY=VALUE. Received: ${input}`);
}
return [match[1], match[2]];
},
});
;