if (Test-Path env:COMSPEC) {
    $Env:YARP_DATA_DIRS = ($Env:YARP_DATA_DIRS.Split(';') | Where-Object { $_ -ne '$(Join-Path -Path $Env:CONDA_PREFIX -ChildPath Library\share\yarp)' }) -join ';'
    $Env:XDG_DATA_DIRS = ($Env:XDG_DATA_DIRS.Split(';') | Where-Object { $_ -ne '$(Join-Path -Path $Env:CONDA_PREFIX -ChildPath Library\share)' }) -join ';'
}
else {
    $Env:YARP_DATA_DIRS = ($Env:YARP_DATA_DIRS.Split(';') | Where-Object { $_ -ne '$(Join-Path -Path $Env:CONDA_PREFIX -ChildPath share/yarp)' }) -join ';'
    $Env:XDG_DATA_DIRS = ($Env:XDG_DATA_DIRS.Split(';') | Where-Object { $_ -ne '$(Join-Path -Path $Env:CONDA_PREFIX -ChildPath share)' }) -join ';'
}

