ahaydon / Qlik-Cli-Windows

Qlik-Cli for Windows
https://adamhaydon.uk/Qlik-Cli-Windows/
GNU General Public License v2.0
110 stars 51 forks source link

Cannot disable standardReload on engine in Update-QlikEngine #199

Closed aburnsy closed 10 months ago

aburnsy commented 1 year ago

$standardReload parameter is a boolean if disabling StandardReload, we have to pass -standardReload $False However, we only set the $engine.settings.standardReload = $standardReload after testing if($standardReload) This will never be set when $standardReload = $False

Could I suggest that we make use of 2 switch statements instead?

ahaydon commented 1 year ago

Should be able to fix this with a change to the condition check, I'll update it to the following so it gets set if the parameter is specified and regardless of the value:

        if ($PSBoundParameters.ContainsKey('StandardReload')) {
            $engine.settings.standardReload = $StandardReload
        }
aburnsy commented 1 year ago

Even better Adam, thanks.

On Thu 16 Feb 2023, 4:20 PM Adam Haydon, @.***> wrote:

Should be able to fix this with a change to the condition check, I'll update it to the following so it gets set if the parameter is specified and regardless of the value:

    if ($PSBoundParameters.ContainsKey('StandardReload')) {
        $engine.settings.standardReload = $StandardReload
    }

— Reply to this email directly, view it on GitHub https://github.com/ahaydon/Qlik-Cli-Windows/issues/199#issuecomment-1433349361, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADLHQQHFEXQGXASC4DN3MKTWXZHTPANCNFSM6AAAAAAU6BRLPQ . You are receiving this because you authored the thread.Message ID: @.***>