vscode-with-extensions: only add flag if extensions > 0

This commit is contained in:
Edmund Wu 2018-12-15 23:08:35 -05:00
parent 5ba44ede4d
commit df8dccfdcf
No known key found for this signature in database
GPG key ID: 43C9E53FFCF51DEC

View file

@ -68,7 +68,7 @@ runCommand "${wrappedPkgName}-with-extensions-${wrappedPkgVersion}" {
ln -sT "${vscode}/share/pixmaps/code.png" "$out/share/pixmaps/code.png"
ln -sT "${vscode}/share/applications/${executableName}.desktop" "$out/share/applications/${executableName}.desktop"
makeWrapper "${vscode}/bin/${executableName}" "$out/bin/${executableName}" \
--add-flags \
"--extensions-dir ${combinedExtensionsDrv}/share/${wrappedPkgName}/extensions"
makeWrapper "${vscode}/bin/${executableName}" "$out/bin/${executableName}" ${lib.optionalString (vscodeExtensions != []) ''
--add-flags "--extensions-dir ${combinedExtensionsDrv}/share/${wrappedPkgName}/extensions"
''}
''