Skip to content

Commit

Permalink
Apply Rollforward fix for M1 macs to PAC instance used as UI backend (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tehcrashxor authored Jun 28, 2022
1 parent 1706bea commit 338d932
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/client/pac/PacWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,18 @@ export class PacInterop implements IPacInterop {
private async proc() : Promise<ChildProcessWithoutNullStreams> {
if (!(this._proc)) {
this.context.telemetry.sendTelemetryEvent('InternalPacProcessStarting');

const env : NodeJS.ProcessEnv = {...process.env, 'PP_TOOLS_AUTOMATION_AGENT': this.context.automationAgent };

// Compatability for users on M1 Macs with .NET 6.0 installed - permit pac and pacTelemetryUpload
// to roll up to 6.0 if 5.0 is not found on the system.
if (os.platform() === 'darwin' && os.version().includes('ARM64')) {
env['DOTNET_ROLL_FORWARD'] = 'Major';
}

this._proc = spawn(this.pacExecutablePath, ["--non-interactive"], {
cwd: this.tempWorkingDirectory,
env: {...process.env, 'PP_TOOLS_AUTOMATION_AGENT': this.context.automationAgent }
env: env
});

const lineReader = readline.createInterface({ input: this._proc.stdout });
Expand Down

0 comments on commit 338d932

Please sign in to comment.