@joddabod5scripts/pokemon-fastfetch 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +4 -11
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -94,12 +94,8 @@ function ensureConfig() {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
function checkFastfetch() {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
shell: true,
|
|
100
|
-
encoding: 'utf8',
|
|
101
|
-
});
|
|
102
|
-
if (result.status !== 0) {
|
|
97
|
+
const result = spawnSync('which', ['fastfetch'], { encoding: 'utf8' });
|
|
98
|
+
if (result.error || result.status !== 0) {
|
|
103
99
|
console.error('fastfetch is not installed. To install it:\n');
|
|
104
100
|
console.error(' macOS: brew install fastfetch\n');
|
|
105
101
|
console.error(' Arch: sudo pacman -S fastfetch\n');
|
|
@@ -109,11 +105,8 @@ function checkFastfetch() {
|
|
|
109
105
|
}
|
|
110
106
|
|
|
111
107
|
function checkPokemonColorscripts() {
|
|
112
|
-
const result = spawnSync('
|
|
113
|
-
|
|
114
|
-
encoding: 'utf8',
|
|
115
|
-
});
|
|
116
|
-
if (result.status !== 0) {
|
|
108
|
+
const result = spawnSync('which', ['pokemon-colorscripts'], { encoding: 'utf8' });
|
|
109
|
+
if (result.error || result.status !== 0) {
|
|
117
110
|
console.error('pokemon-colorscripts is not installed.\n');
|
|
118
111
|
return 1;
|
|
119
112
|
}
|