1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.setCurrentProject = exports.getCurrentProject = void 0;
|
4 | const p_spawn_1 = require("p-spawn");
|
5 |
|
6 | async function getCurrentProject() {
|
7 | const p = await p_spawn_1.spawn('gcloud', ['config', 'list', '--format', 'value(core.project)'], { capture: 'stdout' });
|
8 | return p.stdout.toString().trim();
|
9 | }
|
10 | exports.getCurrentProject = getCurrentProject;
|
11 | async function setCurrentProject(name) {
|
12 |
|
13 | await p_spawn_1.spawn('gcloud', ['config', 'set', 'project', name]);
|
14 | }
|
15 | exports.setCurrentProject = setCurrentProject;
|
16 |
|