Skip to content

Commit

Permalink
main.lua: Support overriding ziggy_path via environment variable
Browse files Browse the repository at this point in the history
This is useful when running on a platform builds of `ziggy` aren't provided for
... or when using a distro-provided build.

The idea for this patch originated in NixOS/nixpkgs#270962,
as I needed a way to point `uosc` at the nix-managed build of `ziggy`.
  • Loading branch information
nbraud committed Dec 4, 2023
1 parent 96b57b2 commit dd846be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/uosc/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ require('lib/menus')
-- Determine path to ziggy
do
local bin = 'ziggy-' .. (state.platform == 'windows' and 'windows.exe' or state.platform)
config.ziggy_path = join_path(mp.get_script_directory(), join_path('bin', bin))
config.ziggy_path = os.getenv('ZIGGY') or join_path(mp.get_script_directory(), join_path('bin', bin))
end

--[[ STATE UPDATERS ]]
Expand Down

0 comments on commit dd846be

Please # to comment.