diff --git a/parser.cpp b/parser.cpp index 7b762c698..a4a53fba7 100644 --- a/parser.cpp +++ b/parser.cpp @@ -2460,7 +2460,7 @@ void parser_t::eval_job(tokenizer_t *tok) if (do_profile) { t2 = get_time(); - profile_item->cmd = wcsdup(j->command_wcstr()); + profile_item->cmd = j->command(); profile_item->skipped=current_block->skip; } diff --git a/tests/test.fish b/tests/test.fish index 610c966e6..6d2ce42c0 100755 --- a/tests/test.fish +++ b/tests/test.fish @@ -32,6 +32,12 @@ if [ "$argv" != '-n' ] echo Exit status differs for file test.fish end + ../fish -p /dev/null -c 'echo testing' >/dev/null + if test $status -ne 0 + set res fail + echo Profiling fails + end + if test $res = ok; echo File test.fish tested ok else