* Extract a xar compatible archive * * @param file path to the archive * @param dest destination directory. Optional. * @param flags flags for the xar. Optional. * @returns path to the destination directory
(file, dest, flags = [])
| 4173 | * @returns path to the destination directory |
| 4174 | */ |
| 4175 | function extractXar(file, dest, flags = []) { |
| 4176 | return __awaiter(this, void 0, void 0, function* () { |
| 4177 | assert_1.ok(IS_MAC, 'extractXar() not supported on current OS'); |
| 4178 | assert_1.ok(file, 'parameter "file" is required'); |
| 4179 | dest = yield _createExtractFolder(dest); |
| 4180 | let args; |
| 4181 | if (flags instanceof Array) { |
| 4182 | args = flags; |
| 4183 | } |
| 4184 | else { |
| 4185 | args = [flags]; |
| 4186 | } |
| 4187 | args.push('-x', '-C', dest, '-f', file); |
| 4188 | if (core.isDebug()) { |
| 4189 | args.push('-v'); |
| 4190 | } |
| 4191 | const xarPath = yield io.which('xar', true); |
| 4192 | yield exec_1.exec(`"${xarPath}"`, _unique(args)); |
| 4193 | return dest; |
| 4194 | }); |
| 4195 | } |
| 4196 | exports.extractXar = extractXar; |
| 4197 | /** |
| 4198 | * Extract a zip |
nothing calls this directly
no test coverage detected
searching dependent graphs…