diff --git a/Userland/Shell/AST.cpp b/Userland/Shell/AST.cpp index 5bfef43ef1..7c6163a527 100644 --- a/Userland/Shell/AST.cpp +++ b/Userland/Shell/AST.cpp @@ -3796,7 +3796,7 @@ ErrorOr> GlobValue::resolve_as_list(RefPtr shell) Vector strings; TRY(strings.try_ensure_capacity(results.size())); for (auto& entry : results) { - TRY(strings.try_append(TRY(String::from_utf8(entry)))); + TRY(strings.try_append(TRY(String::from_deprecated_string(entry)))); } return resolve_slices(shell, move(strings), m_slices); @@ -3927,7 +3927,7 @@ ErrorOr> TildeValue::resolve_as_list(RefPtr shell) if (!shell) return { resolve_slices(shell, Vector { TRY(builder.to_string()) }, m_slices) }; - return { resolve_slices(shell, Vector { TRY(String::from_utf8(shell->expand_tilde(builder.to_deprecated_string()))) }, m_slices) }; + return { resolve_slices(shell, Vector { TRY(String::from_deprecated_string(shell->expand_tilde(builder.to_deprecated_string()))) }, m_slices) }; } ErrorOr> CloseRedirection::apply() const diff --git a/Userland/Shell/Formatter.cpp b/Userland/Shell/Formatter.cpp index fca5c53ea9..3ba32ed8ad 100644 --- a/Userland/Shell/Formatter.cpp +++ b/Userland/Shell/Formatter.cpp @@ -598,7 +598,7 @@ void Formatter::visit(const AST::MatchExpr* node) if (!first) current_builder().append(" | "sv); first = false; - auto node = make_ref_counted(AST::Position {}, String::from_utf8(option.pattern_value).release_value_but_fixme_should_propagate_errors()); + auto node = make_ref_counted(AST::Position {}, String::from_deprecated_string(option.pattern_value).release_value_but_fixme_should_propagate_errors()); node->visit(*this); } }); diff --git a/Userland/Shell/ImmediateFunctions.cpp b/Userland/Shell/ImmediateFunctions.cpp index 557e543bb1..a48956267b 100644 --- a/Userland/Shell/ImmediateFunctions.cpp +++ b/Userland/Shell/ImmediateFunctions.cpp @@ -232,7 +232,7 @@ ErrorOr> Shell::immediate_regex_replace(AST::ImmediateExpressi TRY(replacement->resolve_as_list(this))[0], PosixFlags::Global | PosixFlags::Multiline | PosixFlags::Unicode); - return AST::make_ref_counted(invoking_node.position(), TRY(String::from_utf8(result)), AST::StringLiteral::EnclosureType::None); + return AST::make_ref_counted(invoking_node.position(), TRY(String::from_deprecated_string(result)), AST::StringLiteral::EnclosureType::None); } ErrorOr> Shell::immediate_remove_suffix(AST::ImmediateExpression& invoking_node, Vector> const& arguments) diff --git a/Userland/Shell/Parser.cpp b/Userland/Shell/Parser.cpp index 9c328e9a5d..c2c9cd5f78 100644 --- a/Userland/Shell/Parser.cpp +++ b/Userland/Shell/Parser.cpp @@ -1023,12 +1023,12 @@ AST::MatchEntry Parser::parse_match_entry() for (auto& regex : regexps) { if (names.is_empty()) { for (auto& name : regex.parser_result.capture_groups) - names.append(String::from_utf8(name).release_value_but_fixme_should_propagate_errors()); + names.append(String::from_deprecated_string(name).release_value_but_fixme_should_propagate_errors()); } else { size_t index = 0; for (auto& name : regex.parser_result.capture_groups) { if (names.size() <= index) { - names.append(String::from_utf8(name).release_value_but_fixme_should_propagate_errors()); + names.append(String::from_deprecated_string(name).release_value_but_fixme_should_propagate_errors()); continue; }