mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-03 20:32:07 -04:00
False error Fix (#2109)
* fix: use UnsetWorkspaceName for empty input in workspace rename Previously, empty input would set workspace name to empty string, causing issues with Niri's unique workspace name requirement. Now uses UnsetWorkspaceName action when input is empty. * prevent false failed to load config toast on niri validation Move error toast logic from StdioCollector.onStreamFinished to Process.onExited so it only displays when niri validate actually fails (non-zero exit code), not when stderr outputs early progress messages during config processing.
This commit is contained in:
@@ -99,15 +99,14 @@ Singleton {
|
||||
const lines = text.split('\n');
|
||||
const trimmedLines = lines.map(line => line.replace(/\s+$/, '')).filter(line => line.length > 0);
|
||||
configValidationOutput = trimmedLines.join('\n').trim();
|
||||
if (hasInitialConnection) {
|
||||
ToastService.showError("niri: failed to load config", configValidationOutput, "", "niri-config");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onExited: exitCode => {
|
||||
if (exitCode === 0) {
|
||||
configValidationOutput = "";
|
||||
} else if (hasInitialConnection && configValidationOutput.length > 0) {
|
||||
ToastService.showError("niri: failed to load config", configValidationOutput, "", "niri-config");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user