Skip to content

Commit 63ca9ea

Browse files
authored
adapting to windows
1 parent 396db80 commit 63ca9ea

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Jenkinsfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@ pipeline {
33
stages {
44
stage('Build') {
55
steps {
6-
sh 'npm install'
6+
script {
7+
// Detect the operating system
8+
def isUnix = isUnix()
9+
10+
// Execute npm install using the appropriate step based on the OS
11+
if (isUnix) {
12+
sh 'npm install'
13+
} else {
14+
bat 'npm install'
15+
}
16+
}
717
}
818
}
919
}

0 commit comments

Comments
 (0)