Skip to content

Commit

Permalink
BUGFIX: I FORGOT THE __DIRNAME IN THE CLI COMMANDS
Browse files Browse the repository at this point in the history
  • Loading branch information
AngryKiller committed Mar 18, 2018
1 parent d2bbca5 commit 89d1641
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion example.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// iTunes Bridge 0.3.0-alpha by AngryKiller.
// iTunes Bridge 0.4.1-alpha by AngryKiller.
// GPL-3.0

var iTunes = require('./itunes-bridge');
Expand Down
10 changes: 5 additions & 5 deletions itunes-bridge.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// iTunes Bridge 0.3.0-alpha by AngryKiller.
// iTunes Bridge 0.4.1-alpha by AngryKiller.
// GPL-3.0

var os = require('os');
Expand Down Expand Up @@ -106,12 +106,12 @@ function runScript(req, type) {
if (process.platform === "darwin") {
switch(type){
case "fetch": {
return JSON.parse(execSync('osascript ./jxa/iTunesFetcher.js ' + req));
return JSON.parse(execSync('osascript '+__dirname+'/jxa/iTunesFetcher.js ' + req));
break;
}
case "control": {
try {
execSync('osascript ./jxa/iTunesControl.js ' + req);
execSync('osascript '+__dirname+'/jxa/iTunesControl.js ' + req);
}catch(e){
console.error(e);
}
Expand All @@ -121,12 +121,12 @@ function runScript(req, type) {
} else if (process.platform === "win32") {
switch(type){
case "fetch": {
return JSON.parse(execSync('cscript //Nologo ./wscript/iTunesFetcher.js ' + req));
return JSON.parse(execSync('cscript //Nologo '+__dirname+'/wscript/iTunesFetcher.js ' + req));
break;
}
case "control": {
try {
execSync('cscript //Nologo ./wscript/iTunesControl.js ' + req);
execSync('cscript //Nologo '+__dirname+'/wscript/iTunesControl.js ' + req);
}catch(e){
console.error(e);
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "itunes-bridge",
"version": "0.4.0",
"version": "0.4.1",
"description": "A macOS and Windows NodeJS package to control and get informations from iTunes through AppleScript",
"main": "itunes-bridge.js",
"repository": {
Expand Down

0 comments on commit 89d1641

Please sign in to comment.