1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.changeWorkingDirectoryTask = void 0;
|
4 | const utils_1 = require("../utils");
|
5 | const task_1 = require("./task");
|
6 | function changeWorkingDirectoryTask(directory, root) {
|
7 | return task_1.adhocExecTask((instance) => {
|
8 | if (!utils_1.folderExists(directory)) {
|
9 | throw new Error(`Git.cwd: cannot change to non-directory "${directory}"`);
|
10 | }
|
11 | return ((root || instance).cwd = directory);
|
12 | });
|
13 | }
|
14 | exports.changeWorkingDirectoryTask = changeWorkingDirectoryTask;
|
15 |
|
\ | No newline at end of file |