Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: not possible to override default options #20

Open
srghma opened this issue Mar 18, 2024 · 2 comments
Open

Bug: not possible to override default options #20

srghma opened this issue Mar 18, 2024 · 2 comments

Comments

@srghma
Copy link

srghma commented Mar 18, 2024

I want Nothing to result in infinity

let options = { maxBuffer: fromMaybe infinity initialOptions.maxBuffer }

but if I will set Nothing - it will be overriden

, maxBuffer: fromMaybe defaultOptions.maxBuffer initOptions.maxBuffer

(this is me trying to finish https://github.com/srghma/purescript-tidy/pull/1/files#diff-09daa251f442ef54cabb8984167899cfceb4f53392275f554b5a06906eda48b5)

2024-03-18-08am-43-07-screenshot

2024-03-18-08am-41-50-screenshot

I think options from

defaultOptions =
{ cleanup: true
, preferLocal: Just { localDir: Nothing, execPath: Nothing }
, stripFinalNewline: true
, extendEnv: true
, maxBuffer: toNumber $ 1_000 * 1_000 * 100 -- 100 MB
, encoding: UTF8
, windowsVerbatimArguments: false
, windowsHide: true
, windowsEnableCmdEcho: false
}

should be moved to

{ cleanup: Nothing
, preferLocal: Nothing
, stdin: Nothing
, stdout: Nothing
, stderr: Nothing
, ipc: Nothing
, stdioExtra: Nothing
, stripFinalNewline: Nothing
, extendEnv: Nothing
, encoding: Nothing
, cwd: Nothing
, env: Nothing
, argv0: Nothing
, detached: Nothing
, uid: Nothing
, gid: Nothing
, shell: Nothing
, timeout: Nothing
, maxBuffer: Nothing
, windowsVerbatimArguments: Nothing
, windowsHide: Nothing
, windowsEnableCmdEcho: Nothing

@srghma srghma changed the title Bug: not possible to pass override default options Bug: not possible to override default options Mar 18, 2024
@JordanMartinez
Copy link
Owner

Would options = Just Data.Number.infinity work?

@srghma
Copy link
Author

srghma commented Mar 19, 2024

Would options = Just Data.Number.infinity work?

yes, it works, this is how I fixed other issue in this repo (stdout was an empty string on Normal 0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants