Skip to content

Commit 9692e2e

Browse files
nixos/java: No bashisms in environment.shellInit script
Running dash (the lightweight Debian Almquist shell) results in ``` source: not found ``` For this line which ends up in `/etc/profile`. Let's use `.` instead, according to [the Ubuntu wiki](https://wiki.ubuntu.com/DashAsBinSh#source) and [`checkbashisms`](https://sourceforge.net/projects/checkbaskisms/): ``` possible bashism in /etc/profile line [...] (should be '.', not 'source'): test -e /nix/store/[...]/nix-support/setup-hook && source /nix/store/[...]/nix-support/setup-hook ```
1 parent 8c8cf43 commit 9692e2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nixos/modules/programs/java.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ in
6666
environment.systemPackages = [ cfg.package ];
6767

6868
environment.shellInit = ''
69-
test -e ${cfg.package}/nix-support/setup-hook && source ${cfg.package}/nix-support/setup-hook
69+
test -e ${cfg.package}/nix-support/setup-hook && . ${cfg.package}/nix-support/setup-hook
7070
'';
7171

7272
};

0 commit comments

Comments
 (0)