mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 18:51:03 +01:00
fix iris tool command 'run' for linux &osx users
This commit is contained in:
parent
c462517ca9
commit
f70ff3327e
|
@ -80,7 +80,7 @@ func runAndWatch(flags cli.Flags) error {
|
|||
|
||||
// run the file watcher before all, because the user maybe has a go syntax error before the first run
|
||||
utils.WatchDirectoryChanges(workingDir, func(fname string) {
|
||||
if filepath.Ext(fname) == goExt {
|
||||
if (filepath.Ext(fname) == goExt) || (!isWindows && strings.HasPrefix(fname, goExt)) { // on !windows it sends a .gooutput_RANDOM_STRINGHERE
|
||||
filenameCh <- fname
|
||||
}
|
||||
|
||||
|
@ -105,6 +105,9 @@ func runAndWatch(flags cli.Flags) error {
|
|||
case fname := <-filenameCh:
|
||||
{
|
||||
// it's not a warning but I like to use purple color for this message
|
||||
if !isWindows {
|
||||
fname = " " // we don't want to print the ".gooutput..." so dont print anything as a name
|
||||
}
|
||||
printer.Infof("\n%d- File '%s' changed, reloading...", atomic.LoadUint32(×), fname)
|
||||
|
||||
//kill the prev run
|
||||
|
@ -131,6 +134,7 @@ func runAndWatch(flags cli.Flags) error {
|
|||
printer.Warningf(err.Error())
|
||||
|
||||
} else {
|
||||
// we did .Start, but it should be fast so no need to add a sleeper
|
||||
printer.Successf("ready!")
|
||||
atomic.AddUint32(×, 1)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user