Skip to content

Commit

Permalink
Always override Environment, since its an expected user input
Browse files Browse the repository at this point in the history
Signed-off-by: Jan-Otto Kröpke <[email protected]>
  • Loading branch information
jkroepke committed Nov 14, 2023
1 parent dcc5106 commit 2e6ee3e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packaging/grafana-agent-flow/windows/install_script.nsis
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,8 @@ Function InitializeRegistry

# Define the environment key, which holds environment variables to pass to the
# service.
nsExec::ExecToLog 'Reg.exe query "${REGKEY}" /reg:64 /v Environment'
Pop $0
${If} $0 == 1
nsExec::ExecToLog 'Reg.exe add "${REGKEY}" /reg:64 /v Environment /t REG_MULTI_SZ /d "$Environment"'
Pop $0 # Ignore return result
${EndIf}
nsExec::ExecToLog 'Reg.exe add "${REGKEY}" /reg:64 /v Environment /t REG_MULTI_SZ /d "$Environment"'
Pop $0 # Ignore return result

Return
FunctionEnd
Expand Down

0 comments on commit 2e6ee3e

Please sign in to comment.