Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Char1zardd committed Mar 6, 2022
1 parent 14299ff commit 686d424
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
21 changes: 14 additions & 7 deletions Launch-Scripts/createShortcut.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,15 @@ const createShortcut = () => {
let target = path.join( __dirname, "launch-windows.bat")
let icon = path.join( __dirname, "superalgos.ico")
let shortcutPaths = [
path.join( os.homedir(), "Desktop", `${name}.lnk`),
path.join( os.homedir(), "AppData", "Roaming", "Microsoft", "Windows", "Start Menu", "Programs", `${name}.lnk`)
path.join(os.homedir(), "Desktop", `${name}.lnk`),
path.join(os.homedir(),
"AppData",
"Roaming",
"Microsoft",
"Windows",
"Start Menu",
"Programs",
`${name}.lnk`)
]

// Place Shortcuts using powershell
Expand All @@ -28,12 +35,12 @@ const createShortcut = () => {
shell: "powershell.exe",
execArgv: "-ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -Command"
},
function ( error, stdout){
(error, stdout) => {
if (error) {
console.log('')
console.log("There was an error installing a shortcut: ")
console.log('')
console.log( error )
console.log(error)
return false
} else {
console.log('')
Expand Down Expand Up @@ -74,8 +81,8 @@ const createShortcut = () => {

// Place shortcut in proper folders
let command = `cp ${name}.desktop ~/Desktop/${name}.desktop & cp ${name}.desktop ~/.local/share/applications/${name}.desktop`
execSync( command,
function ( error, stdout ){
execSync(command,
(error) => {
if (error) {
console.log('')
console.log("There was an error installing a shortcut: ")
Expand All @@ -100,7 +107,7 @@ const createShortcut = () => {

// Mac Shortcuts
} else if (os.platform() == "darwin") {
const icon = path.join( __dirname,"/superalgos.ico")
path.join( __dirname,"/superalgos.ico")
const createShortcutCommand = `chmod +x ${name}.command & cp ${name}.command ~/Desktop/${name}.command`
const installFileIconcommand = `npm install -g fileicon`
const changeIconCommand = `./node_modules/fileicon/bin/fileicon set ~/Desktop/${name}.command ./Launch-Scripts/superalgos.ico`
Expand Down
4 changes: 2 additions & 2 deletions Launch-Scripts/runUninstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const uninstall = () => {

// Remove .desktop files
let command = `rm ~/Desktop/${name}.desktop & rm ~/.local/share/applications/${name}.desktop`
exec(command, (error, stdout) => {
exec(command, (error) => {
if (error) {
console.log('')
console.log("There was an error uninstalling shortcuts: ")
Expand All @@ -60,7 +60,7 @@ const uninstall = () => {
if (os.platform() == "darwin") {
// Remove .desktop files
let command = `rm ~/Desktop/${name}.command`
exec(command, (error, stdout) => {
exec(command, (error) => {
if (error) {
console.log('')
console.log("There was an error uninstalling shortcuts: ")
Expand Down
2 changes: 1 addition & 1 deletion Launch-Scripts/systemCheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ function systemCheck () {
}
return true

};
}

module.exports = systemCheck

0 comments on commit 686d424

Please sign in to comment.