question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

macOS: opening documents by file path only is broken

See original GitHub issue

Prerequisites

Steps to reproduce

The following is currently broken on macOS 12.6:

'hi' > t.txt
./t.txt  # !! Nothing happens.

Note that Invoke-Item ./t.txt works.

Expected behavior

./t.txt should open in the default text editor.

Actual behavior

Nothing happens.

Error details

No response

Environment data

PowerShell Core 7.3.0-preview.8 (also present in 7.2.6) on macOS 12.6 (M1)

Visuals

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
SteveL-MSFTcommented, Oct 4, 2022

Took a bit of time going through different versions of pwsh to find out where the regression was introduced and it was in 7.2-preview.6. It appears that the process is being started, but then immediately killed. I’ll have a fix.

1reaction
StevenBucher98commented, Oct 3, 2022

I’ll need to check it, but on Windows I always use Start-Process ./t.txt to open file in default program, I assumed that just ./t.txt would throw an equivalent of “file is not executable”

When you do ./t.txt it opens in notepad, also able to reproduce this on my mac, nothing happens.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"filename" is damaged and can't be opened…
I can open files just fine directly from applications though. ... Just Preview says it is broken and can't open it. iMac. 2018....
Read more >
Fixing Broken File Search On Your Mac (#1600) - YouTube
https://macmost.com/e-1600 If you searching your Mac for a file doesn't return the results you expect, then there are several common ...
Read more >
[FIXED] 3 Ways to Repair Corrupted Files on Mac
Solution 1. Repair Corrupted Files on Mac with First-Aid ... A built-in utility called Disk Utility on Mac can detect and correct errors....
Read more >
5 Ways To Reveal The Path Of a File On MacOS
To see it for yourself, open a Finder window, right-click on any of your files, and select Get Info. On the following screen,...
Read more >
How to tell full path of file on Mac?
You can show full paths in the Spotlight menu by holding command and option. Or in Alfred ⌘C copies the absolute paths of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found