mirror of
https://github.com/opentofu/setup-opentofu.git
synced 2025-12-06 16:15:57 +00:00
14 lines
373 B
JavaScript
14 lines
373 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
const os = require('os');
|
|
const path = require('path');
|
|
|
|
module.exports = (() => {
|
|
// If we're on Windows, then the executable ends with .exe
|
|
const exeSuffix = os.platform().startsWith('win') ? '.exe' : '';
|
|
|
|
return [process.env.TOFU_CLI_PATH, `tofu-bin${exeSuffix}`].join(path.sep);
|
|
})();
|