1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-11-29 09:18:26 +03:00

handle windows usernames with spaces - fixed #2944

This commit is contained in:
Eugene 2020-10-16 12:47:03 +02:00 committed by GitHub
parent 7da941d038
commit f1ecbd1a93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -116,8 +116,9 @@ export class SSHService {
'ssh-keygen.exe', 'ssh-keygen.exe',
) )
await execFile('icacls', [temp.path, '/inheritance:r']) await execFile('icacls', [temp.path, '/inheritance:r'])
let sid = await execFile('whoami', ['/user', '/nh']) let sid = await execFile('whoami', ['/user', '/nh', '/fo', 'csv'])
sid = sid[0].split(' ')[0] sid = sid[0].split(',')[0]
sid = sid.substring(1, sid.length - 1)
await execFile('icacls', [temp.path, '/grant:r', `${sid}:(R,W)`]) await execFile('icacls', [temp.path, '/grant:r', `${sid}:(R,W)`])
} }