How to use the error function from shelljs

Find comprehensive JavaScript shelljs.error code examples handpicked from public code repositorys.

19
20
21
22
23
24
25
26
27
28
29


//------------------------------------------------------------------------------
// shell functions
//------------------------------------------------------------------------------
var shellAssert = function () {
    var errMsg = shell.error();
    if (errMsg) {
        throw new Error(errMsg.toString());
    }
}
fork icon0
star icon0
watch icon0

63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78






// sh.tempdir()


// sh.error()


// sh.cd('/d/code')



fork icon0
star icon0
watch icon0