Skip to content

Commit 047882f

Browse files
author
Monte Goulding
committed
Add warning notification for issue #10
In the event there's an error spawning the process a warning notification will be sent once per session.
1 parent b709f6b commit 047882f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

lib/main.coffee

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module.exports =
2424
@explicitVars = explicitVars
2525
path = require 'path'
2626
@linterPath = path.join(__dirname, '..', 'tools', 'Linter.lc')
27+
@notified = false
2728

2829
deactivate: ->
2930
@subscriptions.dispose()
@@ -68,6 +69,15 @@ module.exports =
6869
resolve(data.stdout.join(''))
6970
handleError = (errorObject) ->
7071
errorObject.handle()
72+
if !@notified
73+
atom.notifications.addWarning(
74+
'Please check you have LiveCode Server installed correctly',
75+
{
76+
detail: 'LiveCode Server is required for linting your files\n' +
77+
'edit the location in the package settings'
78+
}
79+
)
80+
@notified = true
7181
resolve('')
7282
spawnedProcess = new BufferedProcess({command, args, options, stdout, stderr, exit})
7383
spawnedProcess.onWillThrowError(handleError)

tools/GenerateSnippets.livecodescript

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on mouseUp
1414
tab & tab & tab & "builtins:" & cr & \
1515
tab & tab & tab & tab & "suggestions: [" into theSnippets
1616

17+
1718
# functions
1819
set the folder to specialFolderPath("home") & "/livecode/docs/dictionary/function"
1920
repeat for each line theFile in the files

0 commit comments

Comments
 (0)