readFileSync
Appears Un-synchronous or Fails on Raspberry Pi 3
#10621
Labels
question
Issues that look for answers.
Situation:
I'm trying to capture my RPi3's mac addresses using synchronous file reading, getting information from my host system at `/sys/class/net/*/address`.Action:
I have two branches at this repo: https://github.com/noncreature0714/gen-sys-id-node.gitBranch master is the asynchronous version, and works successfully.
Branch sync-test is synchronous, and is not working as expected - almost as if it never ran synchronously.
Results:
Output of 'master' (asynchronous) branch is:Output of 'sync-test' branch is:
Summary
The values where never assigned, almost like what happens when asynchronous operations occur after accessing variables. Additionally, the `console.log()` inside the functions never logs. Which leads me to consider the possibility that `readFileSync` may not be working at all.The text was updated successfully, but these errors were encountered: