Skip to content

Commit

Permalink
Fix #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Leeous committed Jan 23, 2020
1 parent 2d8e4dd commit cfb93d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ function sendClientAddonInfo() {
const bat = spawn(settings.get('gmodDirectory') + '\\bin\\gmpublish.exe', ['list']);
bat.stdout.on('data', (data) => {
var arrayOfOutput = data.toString().split('\n')
var fixedArray = arrayOfOutput.slice(4, arrayOfOutput.length - 3)
var fixedArray = arrayOfOutput.slice(5, arrayOfOutput.length - 3)
console.log(fixedArray)
for (var i = 0; i < fixedArray.length; i++) {
fixedArray[i] = fixedArray[i].replace('/r', '');
ADDON_IDS.push([fixedArray[i].substr(0, 11).replace(/\s/g, '').toString()])
Expand Down Expand Up @@ -139,6 +140,7 @@ ipcMain.on('uploadToWorkshop', (event, gmaDir, iconDir, addonId) => {
const gmpublish = spawn(settings.get('gmodDirectory') + '\\bin\\gmpublish.exe', ['create', '-icon', iconDir, '-addon', gmaDir]);
gmpublish.stdout.on('data', (data) => {
var arrayOfOutput = data.toString().split('\n');
console.log(data.toString);
var fixedArray = arrayOfOutput.slice(arrayOfOutput.length - 8, arrayOfOutput.length - 7);
fixedArray = fixedArray[0].replace(/\D/, '');
fixedArray = fixedArray.substr(5, fixedArray.length);
Expand Down
2 changes: 1 addition & 1 deletion src/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ addonToCreateData = {
"tags": [],
"ignore": []
}
currentAppVersion = "v1.1";
currentAppVersion = "v1.2";



Expand Down

0 comments on commit cfb93d2

Please sign in to comment.