| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent adae66c commit 4368acd
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -126,7 +126,9 @@ const isPi = (() => { | |||
| 126 | 126 | // the contents of `/sys/firmware/devicetree/base/model` but that doesn't | |
| 127 | 127 | // work inside a container. Match the chipset model number instead. | |
| 128 | 128 | const cpuinfo = fs.readFileSync('/proc/cpuinfo', { encoding: 'utf8' }); | |
| 129 | - return /^Hardware\s*:\s*(.*)$/im.exec(cpuinfo)?.[1] === 'BCM2835'; | ||
| 129 | + const ok = /^Hardware\s*:\s*(.*)$/im.exec(cpuinfo)?.[1] === 'BCM2835'; | ||
| 130 | + /^/.test(''); // Clear RegExp.$_, some tests expect it to be empty. | ||
| 131 | + return ok; | ||
| 130 | 132 | } catch { | |
| 131 | 133 | return false; | |
| 132 | 134 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments