rerunInvocation function
The executable and arguments that rerun this CLI with args.
A native build reruns invokedExecutable, which follows the path to the
version installed now. Every other installation runs scriptPath on the
Dart VM.
Implementation
({String executable, List<String> args}) rerunInvocation(
final List<String> args, {
required final CliInstallation installation,
required final String invokedExecutable,
required final String resolvedExecutable,
required final String scriptPath,
}) {
if (installation == CliInstallation.native) {
return (executable: invokedExecutable, args: args);
}
return (executable: resolvedExecutable, args: [scriptPath, ...args]);
}