command.js
This file
Path
lib/arguments/command.js
18 lines · 643 bytes · JavaScript
Last changed by
Upgrade xo (#980)ehmickybefore adoptionccfa412
History of this fileTake it
12345678910111213141516171819import {logCommand} from '../verbose/start.js';import {getVerboseInfo} from '../verbose/info.js';import {getStartTime} from '../return/duration.js';import {joinCommand} from './escape.js';import {normalizeFdSpecificOption} from './specific.js';
export const handleCommand = (filePath, rawArguments, rawOptions) => { const startTime = getStartTime(); const {command, escapedCommand} = joinCommand(filePath, rawArguments); const verboseInfo = getVerboseInfo(normalizeFdSpecificOption(rawOptions, 'verbose')); logCommand(escapedCommand, verboseInfo, rawOptions); return { command, escapedCommand, startTime, verboseInfo, };};