Update git.js

This commit is contained in:
JamesIves 2020-04-11 13:59:32 -04:00
parent 78e2ccef3c
commit f8bad71bf4

View File

@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@actions/core");
const io_1 = require("@actions/io");
const execute_1 = require("./execute");
const util_1 = require("./util");
/* Initializes git in the workspace. */
@ -143,9 +144,8 @@ function deploy(action) {
throw new Error(`The deploy step encountered an error: ${util_1.suppressSensitiveInformation(error.message, action)}`);
}
finally {
// Ensures the deployment directory is safely removed.
yield execute_1.execute(`chmod u+w -R ${temporaryDeploymentDirectory}`, action.workspace);
yield execute_1.execute(`rm -rf ${temporaryDeploymentDirectory}`, action.workspace);
// Ensures the deployment directory is safely removed after each deployment.
yield io_1.rmRF(temporaryDeploymentDirectory);
}
});
}