Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
fix: issues with write permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
koen1711 committed Jan 21, 2024
1 parent 477f47a commit dd4131e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app/services/python-uploader/mip/PackageManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ export class PackageManager {
if (!url) {
throw new Error('No url provided');
} else if (url.startsWith('github:')) {
const writer = this.serialPort.writable.getWriter();
const reader = this.serialPort.readable.getReader();
let writer = this.serialPort.writable.getWriter();
let reader = this.serialPort.readable.getReader();
try {
await mkdir(writer, reader, '/lib');
} catch (error) {}
writer.releaseLock();
reader.releaseLock();
let json = JSON.parse(await PackageManager.fetchMipUrl(url));
const version = json['version'];
if (await this.checkLibraryVersion(version, PackageManager.getLibraryName(url))) {
Expand All @@ -69,6 +71,8 @@ export class PackageManager {
content.push({name: '/lib/' + file[0], content: response});
}

writer = this.serialPort.writable.getWriter();
reader = this.serialPort.readable.getReader();
// get a list of .dist-info files in the lib folder and delete them
const response = await ls(writer, reader, '/lib');
// get a list of all the .dist-info folders
Expand Down

0 comments on commit dd4131e

Please sign in to comment.