You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When merging the json was made default, the Invoke-ScubaCached function was modified to be compatible with the ScubaResults.json file. However, this introduced a bug. What it tries to do is if there is no provider output json file, open the ScubaResults.json file and save one from the data in the Raw field. It tries to save it with this call:
So, essentially, we're trying to save the file as "example-out-path/ProviderSettingsExport.json/ProviderSettingsExport.json". However, this call fails because the Set-Utf8NoBom function requires the -Location path to already exist, which in this case, it doesn't.
The fix is easy, we just need to replace that Set-Utf8NoBom call with this:
🐛 Summary
When merging the json was made default, the
Invoke-ScubaCached
function was modified to be compatible with the ScubaResults.json file. However, this introduced a bug. What it tries to do is if there is no provider output json file, open the ScubaResults.json file and save one from the data in theRaw
field. It tries to save it with this call:Problem is,
$ProviderJSONFilePath
already has the "$OutProviderFileName.json" part embedded in it.So, essentially, we're trying to save the file as "example-out-path/ProviderSettingsExport.json/ProviderSettingsExport.json". However, this call fails because the
Set-Utf8NoBom
function requires the-Location
path to already exist, which in this case, it doesn't.The fix is easy, we just need to replace that
Set-Utf8NoBom
call with this:To reproduce
Invoke-Scuba
Invoke-ScubaCached -OutPath .\path-to-output-folder-from-step-1\ -ExportProvider $false
Expected behavior
Invoke-ScubaCached
to run successfully.Any helpful log output or screenshots
The text was updated successfully, but these errors were encountered: