Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b1ef801

Browse files
author
Akos Kitta
committed
fix: install AVR without post scripts running
to avoid UAC prompt on Windows CI Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
1 parent 1da8f6d commit b1ef801

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

‎arduino-ide-extension/src/common/protocol/boards-service.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,16 @@ export const BoardsService = Symbol('BoardsService');
141141
export interface BoardsService
142142
extends Installable<BoardsPackage>,
143143
Searchable<BoardsPackage, BoardSearch> {
144+
install(options: {
145+
item: BoardsPackage;
146+
progressId?: string;
147+
version?: Installable.Version;
148+
noOverwrite?: boolean;
149+
/**
150+
* Only for testing to avoid confirmation dialogs from Windows User Access Control when installing a platform.
151+
*/
152+
skipPostInstall?: boolean;
153+
}): Promise<void>;
144154
getState(): Promise<AvailablePorts>;
145155
getBoardDetails(options: { fqbn: string }): Promise<BoardDetails | undefined>;
146156
getBoardPackage(options: { id: string }): Promise<BoardsPackage | undefined>;

‎arduino-ide-extension/src/node/boards-service-impl.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ export class BoardsServiceImpl
434434
progressId?: string;
435435
version?: Installable.Version;
436436
noOverwrite?: boolean;
437+
skipPostInstall?: boolean;
437438
}): Promise<void> {
438439
const item = options.item;
439440
const version = !!options.version
@@ -450,6 +451,9 @@ export class BoardsServiceImpl
450451
req.setPlatformPackage(platform);
451452
req.setVersion(version);
452453
req.setNoOverwrite(Boolean(options.noOverwrite));
454+
if (options.skipPostInstall) {
455+
req.setSkipPostInstall(true);
456+
}
453457

454458
console.info('>>> Starting boards package installation...', item);
455459

‎arduino-ide-extension/src/test/node/core-service-impl.slow-test.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,15 @@ async function start(
140140
configService.onStart();
141141
daemon.onStart();
142142
await waitForEvent(daemon.onDaemonStarted, 10_000);
143-
const boardService = container.get<BoardsServiceImpl>(BoardsServiceImpl);
143+
const boardService = container.get<BoardsService>(BoardsService);
144144
const searchResults = await boardService.search({ query: avr });
145145
const platform = searchResults.find(({ id }) => id === avr);
146146
if (!platform) {
147147
throw new Error(`Could not find platform: ${avr}`);
148148
}
149-
await boardService.install({ item: platform });
149+
await boardService.install({ item: platform,skipPostInstall: true });
150150
}
151151

152-
// eslint-disable-next-line @typescript-eslint/no-unused-vars, unused-imports/no-unused-vars
153152
function createContainer(): Container {
154153
const container = new Container({ defaultScope: 'Singleton' });
155154
const module = new ContainerModule((bind) => {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /