sl-sh-dev / sl-sh

Simple Lisp Shell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Panic on a symbol containing '=' with export.

sstanfield opened this issue · comments

The rust set_var call to set an environment variable will panic under these conditions:

/// This function may panic if key is empty, contains an ASCII equals sign
/// '=' or the NUL character '\0', or when the value contains the NUL
/// character.

Make sure to filter these out. Improve tests to cover this and also evaluate if export should drop the quote on the symbol (to be consistent with def and set!).