nixos/switch-to-configuration: fix units starting with dash
Fix units starting with `-` being recognized as options.
This commit is contained in:
parent
76aa29d2ed
commit
8fb63401af
1 changed files with 1 additions and 1 deletions
|
@ -167,7 +167,7 @@ sub get_active_units {
|
|||
# Takes the name of the unit as an argument and returns a bool whether the unit is active or not.
|
||||
sub unit_is_active {
|
||||
my ($unit_name) = @_;
|
||||
my $units = busctl_call_systemd1_mgr("ListUnitsByNames", "as", 1, $unit_name)->{data}->[0];
|
||||
my $units = busctl_call_systemd1_mgr("ListUnitsByNames", "as", 1, , "--", $unit_name)->{data}->[0];
|
||||
if (scalar(@{$units}) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue