Skip to content

Commit f87a896

Browse files
committed
🐛 QD-12336 Update function isNative, take care of --within-docker param
1 parent 89a0e7d commit f87a896

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

common/qodana.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,16 @@ export function extractArg(
132132
}
133133

134134
export function isNativeMode(args: string[]): boolean {
135-
return args.includes('--ide')
135+
if (args.includes('--ide') || args.includes('--within-docker=false')) {
136+
return true
137+
}
138+
139+
let index = args.findIndex(arg => arg =='--within-docker')
140+
141+
if (index == -1) return false
142+
let nextIndex = index + 1
143+
144+
return args.length > nextIndex && args[nextIndex] == 'false';
136145
}
137146

138147
/**

vsts/QodanaScan/index.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9864,7 +9864,18 @@ function extractArg(argShort, argLong, args) {
98649864
return arg;
98659865
}
98669866
function isNativeMode(args) {
9867-
return args.includes("--ide");
9867+
export function isNativeMode(args: string[]): boolean {
9868+
if (args.includes('--ide') || args.includes('--within-docker=false')) {
9869+
return true
9870+
}
9871+
9872+
let index = args.findIndex(arg => arg =='--within-docker')
9873+
9874+
if (index == -1) return false
9875+
let nextIndex = index + 1
9876+
9877+
return args.length > nextIndex && args[nextIndex] == 'false';
9878+
};
98689879
}
98699880
function getQodanaPullArgs(args) {
98709881
const pullArgs = ["pull"];

0 commit comments

Comments
 (0)