hepcat72 has asked for the wisdom of the Perl Monks concerning the following question:
This is a cross-post from stackexchange, so apologies for that. Given the initial response there, I thought this may be a better place to, but if you would like to see my screenshots, they are in that stack post.
I updated my mac mini (that is a part of my entertainment center) to Sonoma the other day. It was long overdue. I think it was still on High Sierra before. I have a Node-RED instance on that computer (also lagging behind on updates at version v1.2.7, but I suspect that this is unrelated to the version - and it would be nice if someone with the latest version could run my MRE and confirm it's an issue in the latest NR...).
My script that identifies the correct sqlite file of the Reminders app database (as well as other scripts that do similar things) no longer works correctly after the update. I have boiled down the problem with differing behaviors of the bsd_glob subroutine that is a part of the File::Glob ':glob' perl module.
The thing is, it works as expected on the command line (even when called from other scripts (like Apple Scripts and SLURM scripts I call it from at work)). But after the update to Sonoma, it no longer behaves the same from the Node-RED exec node, which returns no file matches.
Here is an MRE example, run from...
The command line **returns 3 files**:
[golrath:~] robleach% perl -e 'use File::Glob ":glob";print(bsd_glob(" +/Users/robleach/Library/Group Containers/group.com.apple.reminders/Co +ntainer_v1/Stores/Data-*-*.sqlite",GLOB_CSH),"\n")' /Users/robleach/Library/Group Containers/group.com.apple.reminders/Con +tainer_v1/Stores/Data-A0D24954-1339-494B-9E7D-9D0911C096F8.sqlite/Use +rs/robleach/Library/Group Containers/group.com.apple.reminders/Contai +ner_v1/Stores/Data-B826F8F1-0153-4318-8666-F1C8EBBFCE96.sqlite/Users/ +robleach/Library/Group Containers/group.com.apple.reminders/Container +_v1/Stores/Data-D8328338-F382-4E34-8C39-E1DC35D60A32.sqlite
And via a Node-RED exec node, **it returns 0 files**.
My first thought was that the perl executable, module, or even csh versions must have differed, but I confirmed they're all the same between the command line and Node-RED.
The only difference is the perl soft-link in the path. Could that be what's causing the difference in behavior? I can't imagine how it could...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Weird differing bsd_glob behavior
by Corion (Patriarch) on Jul 23, 2024 at 16:48 UTC | |
by hepcat72 (Sexton) on Jul 23, 2024 at 17:49 UTC | |
by ikegami (Patriarch) on Jul 23, 2024 at 19:06 UTC | |
by cavac (Parson) on Jul 24, 2024 at 10:24 UTC | |
Re: Weird differing bsd_glob behavior
by Anonymous Monk on Jul 26, 2024 at 05:01 UTC |