UNPKG

bit-bin

Version:

<a href="https://opensource.org/licenses/Apache-2.0"><img alt="apache" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a> <a href="https://github.com/teambit/bit/blob/master/CONTRIBUTING.md"><img alt="prs" src="https://img.shields.io/b

39 lines (28 loc) 1.14 kB
"use strict"; var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = shouldShowInteractive; function globalConfig() { const data = _interopRequireWildcard(require("../../api/consumer/lib/global-config")); globalConfig = function () { return data; }; return data; } function _constants() { const data = require("../../constants"); _constants = function () { return data; }; return data; } function shouldShowInteractive(commandConfigName) { const specificCommandConfig = globalConfig().getSync(commandConfigName); // the value in the config is string so we need to compare it to string // we use specificCommandConfig === 'true' to make it false in case of wrong value if (specificCommandConfig !== undefined) return specificCommandConfig === 'true'; const generalInteractiveConfig = globalConfig().getSync(_constants().CFG_INTERACTIVE); if (generalInteractiveConfig !== undefined) return generalInteractiveConfig === 'true'; // Default is to not show interactive return false; }