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

Panic with set_env with wrong input #945

Closed
MolotovCherry opened this issue Sep 12, 2023 · 2 comments
Closed

Panic with set_env with wrong input #945

MolotovCherry opened this issue Sep 12, 2023 · 2 comments
Assignees
Labels
Milestone

Comments

@MolotovCherry
Copy link

MolotovCherry commented Sep 12, 2023

Describe The Bug

If the wrong input is entered for set_env, we get a crash. Unsure if this is related to ducky or cargo make itself, but cargo make is where I reproduced it on, so.

These are of course bad inputs, but from I have gathered of the error messages I have seen, there should be an error message instead of a crash

To Reproduce

env_scripts = [
    # set the visual studio dev console environment
    '''
#!@duckscript
key = set ""
value = set ""
set_env ${key} ${value}
set_env "" "\n"
''',
]

Error Stack

thread 'main' panicked at library\std\src\env.rs:348:9:
failed to set environment variable `""` to `""`: The parameter is incorrect. (os error 87)
stack backtrace:
   0:     0x7ff6d2b7ecaa - <unknown>
   1:     0x7ff6d2ba74db - <unknown>
   2:     0x7ff6d2b784c1 - <unknown>
   3:     0x7ff6d2b7ea2a - <unknown>
   4:     0x7ff6d2b817a3 - <unknown>
   5:     0x7ff6d2b81353 - <unknown>
   6:     0x7ff6d2b81f2a - <unknown>
   7:     0x7ff6d2b81e0d - <unknown>
   8:     0x7ff6d2b7f969 - <unknown>
   9:     0x7ff6d2b81b00 - <unknown>
  10:     0x7ff6d2be2867 - <unknown>
  11:     0x7ff6d2b72081 - <unknown>
  12:     0x7ff6d279925b - <unknown>
  13:     0x7ff6d29e4572 - <unknown>
  14:     0x7ff6d29e02fb - <unknown>
  15:     0x7ff6d29df81f - <unknown>
  16:     0x7ff6d2651826 - <unknown>
  17:     0x7ff6d253fdd9 - <unknown>
  18:     0x7ff6d275dcec - <unknown>
  19:     0x7ff6d264f308 - <unknown>
  20:     0x7ff6d2651283 - <unknown>
  21:     0x7ff6d2421088 - <unknown>
  22:     0x7ff6d2421006 - <unknown>
  23:     0x7ff6d242101c - <unknown>
  24:     0x7ff6d2b70618 - <unknown>
  25:     0x7ff6d24210cc - <unknown>
  26:     0x7ff6d2bc4888 - <unknown>
  27:     0x7ffe9367257d - BaseThreadInitThunk
  28:     0x7ffe951aaa68 - RtlUserThreadStart
@sagiegurari
Copy link
Owner

Thanks for reporting. seems related to duckscript. I'll fix it.

@sagiegurari sagiegurari added this to the 0.37.1 milestone Sep 17, 2023
@sagiegurari
Copy link
Owner

Fix pushed to duckscript and cargo-make now packages it

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

No branches or pull requests

2 participants