UNPKG

apiconnect-config

Version:

Configuration module IBM API Connect Developer Toolkit

28 lines (22 loc) 901 B
/********************************************************* {COPYRIGHT-TOP} *** * Licensed Materials - Property of IBM * 5725-Z22, 5725-Z63, 5725-U33, 5725-Z63 * * (C) Copyright IBM Corporation 2016, 2017 * * All Rights Reserved. * US Government Users Restricted Rights - Use, duplication or disclosure * restricted by GSA ADP Schedule Contract with IBM Corp. ********************************************************** {COPYRIGHT-END} **/ // Node module: apiconnect-config 'use strict'; module.exports = getUserConfigDir; var mkdirp = require('mkdirp'); var osenv = require('osenv'); var path = require('path'); function getUserConfigDir() { process.env.APIC_CLI_CONFIG_DIR = process.env.APIC_CLI_CONFIG_DIR || '.apiconnect'; var configDir = process.env.APIC_CONFIG_PATH || path.resolve(osenv.home(), process.env.APIC_CLI_CONFIG_DIR); mkdirp.sync(configDir); return configDir; };