darlinghq / darling

Darwin/macOS emulation layer for Linux
http://www.darlinghq.org
GNU General Public License v3.0
11.55k stars 446 forks source link

`sudo` does not accept `VAR=value` #1388

Open ShamrockLee opened 1 year ago

ShamrockLee commented 1 year ago

Expected Result

The following command should work:

sudo HOME=/Volumes/SystemRoot/home/janedoe ls

Actual Result

Running sudo failed: No such file or directory

Steps To Reproduce

  1. Type the command mentioned in the "Expected Result" section

System Information x86_64-linux NixOS

$ cat /etc/os-release
BUILD_ID="23.05.20230604.e7603eb"
DOCUMENTATION_URL="https://nixos.org/learn.html"
HOME_URL="https://nixos.org/"
ID=nixos
LOGO="nix-snowflake"
NAME=NixOS
PRETTY_NAME="NixOS 23.05 (Stoat)"
SUPPORT_END="2023-12-31"
SUPPORT_URL="https://nixos.org/community.html"
VERSION="23.05 (Stoat)"
VERSION_CODENAME=stoat
VERSION_ID="23.05"
$ nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.31, NixOS, 23.05 (Stoat), 23.05.20230604.e7603eb`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.15.0`
 - nixpkgs: `/nix/store/q6p550fq8sx3xxhb256x3pdbxj1r88wm-source`
Software Version
Linux Kernel 6.1.31
Darling 557e7e9dece394a3f623825679474457e5b64fd0