@ts-common/azure-js-dev-tools
Version:
Developer dependencies for TypeScript related projects
33 lines • 1.09 kB
JavaScript
;
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.mvnExecutable = void 0;
var tslib_1 = require("tslib");
var os = tslib_1.__importStar(require("os"));
/**
* Get the executable that will be used to run mvn (Maven).
* @param options The options for specifying which executable to use.
*/
function mvnExecutable(options) {
if (options === void 0) { options = {}; }
if (!options.osPlatform) {
options.osPlatform = os.platform();
}
var result = options.mvnPath || "";
if (!result.endsWith("mvn") && !result.endsWith("mvn.cmd")) {
if (result && !result.endsWith("/") && !result.endsWith("\\")) {
result += "/";
}
result += "mvn";
}
if (options.osPlatform === "win32" && !result.endsWith(".cmd")) {
result += ".cmd";
}
return result;
}
exports.mvnExecutable = mvnExecutable;
//# sourceMappingURL=mvn.js.map