Skip to content
Prev Previous commit
Fixes merge conflicts
  • Loading branch information
arcanis committed Mar 29, 2022
commit 669d3c95dc6322d159e77de9fc9b8b8f295611a1
17 changes: 1 addition & 16 deletions packages/plugin-essentials/sources/commands/set/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,34 +127,19 @@ export default class SetVersionCommand extends BaseCommand {
stdout: this.context.stdout,
includeLogs: !this.context.quiet,
}, async (report: StreamReport) => {
<<<<<<< Updated upstream
const fetchBuffer = async () => {
const filePrefix = `file://`;

if (bundleRef.url.startsWith(filePrefix)) {
report.reportInfo(MessageName.UNNAMED, `Retrieving ${formatUtils.pretty(configuration, bundleRef.url, FormatType.PATH)}`);
return await xfs.readFilePromise(npath.toPortablePath(bundleRef.url.slice(filePrefix.length)));
return await xfs.readFilePromise(bundleRef.url.slice(filePrefix.length) as PortablePath);
} else {
report.reportInfo(MessageName.UNNAMED, `Downloading ${formatUtils.pretty(configuration, bundleRef.url, FormatType.URL)}`);
return await httpUtils.get(bundleRef.url, {configuration});
}
};

await setVersion(configuration, bundleRef.version, fetchBuffer, {report, useYarnPath: this.useYarnPath});
=======
const filePrefix = `file://`;

let bundleBuffer: Buffer;
if (bundleUrl.startsWith(filePrefix)) {
report.reportInfo(MessageName.UNNAMED, `Downloading ${formatUtils.pretty(configuration, bundleUrl, FormatType.URL)}`);
bundleBuffer = await xfs.readFilePromise(bundleUrl.slice(filePrefix.length) as PortablePath);
} else {
report.reportInfo(MessageName.UNNAMED, `Retrieving ${formatUtils.pretty(configuration, bundleUrl, FormatType.PATH)}`);
bundleBuffer = await httpUtils.get(bundleUrl, {configuration});
}

await setVersion(configuration, null, bundleBuffer, {report});
>>>>>>> Stashed changes
});

return report.exitCode();
Expand Down