var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.taskRnvFastlane=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _exec=require("../../core/systemManager/exec");
var _common=require("../../core/common");
var _constants=require("../../core/constants");






var _setupManager=_interopRequireDefault(require("../../core/setupManager"));

var taskRnvFastlane=function taskRnvFastlane(c){var args,setupInstance,appFolder,fastlaneArgs;return _regenerator.default.async(function taskRnvFastlane$(_context){while(1){switch(_context.prev=_context.next){case 0:
args=(0,_common.getCliArguments)(c);
args.shift();if(

(0,_exec.commandExistsSync)('fastlane')){_context.next=6;break;}
setupInstance=(0,_setupManager.default)();_context.next=6;return _regenerator.default.awrap(
setupInstance.askToInstallSDK('fastlane'));case 6:


appFolder=(0,_common.getAppFolder)(c,c.platform);

fastlaneArgs=(0,_toConsumableArray2.default)(c.program.rawArgs);
fastlaneArgs=fastlaneArgs.slice(3);return _context.abrupt("return",

(0,_exec.executeAsync)(c,"fastlane "+fastlaneArgs.join(' '),{
interactive:true,
env:process.env,
cwd:appFolder}));case 10:case"end":return _context.stop();}}},null,null,null,Promise);};exports.taskRnvFastlane=taskRnvFastlane;var _default=



{
description:'Run fstalane commands directly',
fn:taskRnvFastlane,
task:'fastlane',
params:_constants.PARAMS.withBase(),
platforms:[
_constants.IOS,
_constants.TVOS,
_constants.ANDROID,
_constants.ANDROID_TV,
_constants.FIRE_TV,
_constants.ANDROID_WEAR]};exports.default=_default;
//# sourceMappingURL=task.rnv.fastlane.js.map