Verified Commit c236e238 authored by Aral Balkan's avatar Aral Balkan
Browse files

Fixes #256: (macOS) incorrect unprivileged home path leads to crash

parent 5a270cb7
......@@ -4,11 +4,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [16.0.3] - 2020-12-11
### Fixed
- Regression on macOS: incorrect unprivileged home path calculation leads to crash (#256)
## [16.0.2] - 2020-12-11
### Fixed
- Regression: `site disable` crashes
- Regression: `site disable` crashes (#253)
- Regression: `--sync-to` without `--sync-from` fails (#254)
- No longer crashes on enable command when running under Node.js on older systemd versions that require an absolute path for the binary in the service unit description. (Bug encountered on elementary OS Hera 5.1.7). (#255)
......
......@@ -26,7 +26,8 @@ class Util {
return os.homedir()
} else {
// Linuxesque: return non-root home folder even if invoked via sudo.
return `/home/${Util.unprivilegedAccountName()}`
const accountsFolder = os.platform() === 'darwin' ? 'Users' : 'home'
return `/${accountsFolder}/${Util.unprivilegedAccountName()}`
}
}
......
{
"name": "@small-tech/site.js",
"version": "16.0.2",
"version": "16.0.3",
"description": "Small Web construction set.",
"keywords": [
"web server",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment