Skip to content

Commit e605c28

Browse files
committed
Make smartMacroDocRootPath writable before copying in doc-dev
For NixOS users, the destination directory here is not writable, but it should be. This was originally reported in NixOS/nixpkgs#423634 Fixes #2679
1 parent f4e4993 commit e605c28

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

packages/uhk-agent/src/util/copy-smart-macro-doc-to-webserver.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { LogService } from 'uhk-common';
44
import {getFirmwarePackageJson,TmpFirmware} from 'uhk-usb';
55

66
import { getSmartMacroDocRootPath } from './get-smart-macro-doc-root-path';
7+
import { makeFolderWriteableToUserOnLinux } from '../util';
78

89
export async function copySmartMacroDocToWebserver(firmwarePath: TmpFirmware, logger: LogService): Promise<void> {
910
logger.misc('[SmartMacroCopy] start');
@@ -26,6 +27,7 @@ export async function copySmartMacroDocToWebserver(firmwarePath: TmpFirmware, lo
2627

2728
const referenceManualFirmwarePath = path.join(firmwarePath.tmpDirectory, 'doc-dev');
2829
const referenceManualDestination = path.join(destination, 'doc-dev');
30+
await makeFolderWriteableToUserOnLinux(destination);
2931
await cp(referenceManualFirmwarePath, referenceManualDestination, { force: true, recursive: true });
3032

3133
logger.misc('[SmartMacroCopy] done');

0 commit comments

Comments
 (0)