Make config default if broken (#482)

* Make config default if broken

* Make config default if broken
This commit is contained in:
JT
2021-12-13 16:16:51 +13:00
committed by GitHub
parent 90ddb23492
commit 2013e9300a
26 changed files with 47 additions and 31 deletions

View File

@ -52,7 +52,7 @@ impl Command for BuildString {
call: &Call,
_input: PipelineData,
) -> Result<nu_protocol::PipelineData, nu_protocol::ShellError> {
let config = stack.get_config()?;
let config = stack.get_config().unwrap_or_default();
let output = call
.positional
.iter()

View File

@ -37,7 +37,7 @@ impl Command for StrCollect {
) -> Result<PipelineData, ShellError> {
let separator: Option<String> = call.opt(engine_state, stack, 0)?;
let config = stack.get_config()?;
let config = stack.get_config().unwrap_or_default();
// Hmm, not sure what we actually want. If you don't use debug_string, Date comes out as human readable
// which feels funny