Skip to content

Commit 401293e

Browse files
committed
Upload Linux Support
1 parent e879ae4 commit 401293e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

build/linux.build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version: 10
1+
version: 11

src/shared/AppHelperCheck.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
import { stat, writeFile } from '@shared/fs-extra'
1+
import { writeFile } from '@shared/fs-extra'
22
import Helper from '../fork/Helper'
33
import { createConnection } from 'node:net'
4+
import { userInfo } from 'node:os'
45

56
const SOCKET_PATH = '/tmp/flyenv-helper.sock'
67
const Role_Path = '/tmp/flyenv.role'
78
const Role_Path_Back = '/usr/local/share/FlyEnv/flyenv.role'
89

910
export const AppHelperRoleFix = async () => {
10-
const stats = await stat(process.execPath)
11-
const role = `${stats.uid}:${stats.gid}`
11+
const uinfo = userInfo()
12+
const role = `${uinfo.uid}:${uinfo.gid}`
1213
await writeFile(Role_Path, role)
1314
try {
1415
Helper.send('tools', 'writeFileByRoot', Role_Path_Back, role).catch()

0 commit comments

Comments
 (0)