Skip to content

Commit 491127d

Browse files
committed
fix broken path selection
1 parent 551b77f commit 491127d

File tree

2 files changed

+16
-26
lines changed

2 files changed

+16
-26
lines changed

K8sFileBrowser/ViewModels/MainWindowViewModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ private void RegisterReadFiles(IKubernetesService kubernetesService)
133133
{
134134
// read the file information when the path changes
135135
this
136-
.WhenAnyValue(c => c.SelectedContainer)
136+
.WhenAnyValue(c => c.SelectedContainer, c => c.SelectedPath)
137137
.Throttle(new TimeSpan(10))
138-
.Select(x => x == null
138+
.Select(x => x.Item1 == null || x.Item2 == null
139139
? new List<FileInformation>()
140-
: GetFileInformation(kubernetesService, SelectedPath!, SelectedPod!, SelectedNamespace!, x))
140+
: GetFileInformation(kubernetesService, x.Item2, SelectedPod!, SelectedNamespace!, x.Item1))
141141
.ObserveOn(RxApp.MainThreadScheduler)
142142
.Subscribe(x => FileInformation = x);
143143
}

build/Build.cs

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ class Build : NukeBuild
1111
{
1212
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
1313
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
14-
14+
1515
[Parameter] readonly string Version = "1.0.0";
16-
16+
1717
AbsolutePath SourceDirectory => RootDirectory / "K8sFileBrowser";
1818
AbsolutePath OutputDirectory => RootDirectory / "output";
1919
AbsolutePath WinOutputDirectory => OutputDirectory / "win";
2020
AbsolutePath LinuxOutputDirectory => OutputDirectory / "linux";
21-
21+
2222
AbsolutePath WinZip => OutputDirectory / $"K8sFileBrowser_{Version}.zip";
2323
AbsolutePath LinuxGz => OutputDirectory / $"K8sFileBrowser_{Version}.tgz";
24-
24+
2525
AbsolutePath ProjectFile => SourceDirectory / "K8sFileBrowser.csproj";
2626

2727
readonly string ExcludedExtensions = "pdb";
28-
28+
2929
public static int Main () => Execute<Build>(x => x.Publish);
3030

3131

@@ -37,14 +37,6 @@ class Build : NukeBuild
3737
OutputDirectory.DeleteDirectory();
3838
});
3939

40-
Target Restore => _ => _
41-
.Executes(() =>
42-
{
43-
DotNet($"restore {ProjectFile}");
44-
//DotNetTasks.DotNetRestore(new DotNetRestoreSettings());
45-
});
46-
47-
4840
Target PublishWin => _ => _
4941
.DependsOn(Clean)
5042
.Executes(() =>
@@ -62,18 +54,17 @@ class Build : NukeBuild
6254
.SetCopyright("Copyright (c) 2023")
6355
.SetVersion(Version)
6456
.SetProcessArgumentConfigurator(_ => _
65-
.Add("-p:IncludeNativeLibrariesForSelfExtract=true"))
66-
.EnableNoRestore());
67-
57+
.Add("-p:IncludeNativeLibrariesForSelfExtract=true")));
58+
6859
WinOutputDirectory.ZipTo(
6960
WinZip,
7061
filter: x => !x.HasExtension(ExcludedExtensions),
7162
compressionLevel: CompressionLevel.SmallestSize,
7263
fileMode: FileMode.CreateNew);
7364
});
74-
65+
7566
Target PublishLinux => _ => _
76-
.DependsOn(Clean)
67+
.DependsOn(Clean)
7768
.Executes(() =>
7869
{
7970
DotNetPublish(s => s
@@ -89,19 +80,18 @@ class Build : NukeBuild
8980
.SetCopyright("Copyright (c) 2023")
9081
.SetVersion(Version)
9182
.SetProcessArgumentConfigurator(_ => _
92-
.Add("-p:IncludeNativeLibrariesForSelfExtract=true"))
93-
.EnableNoRestore());
94-
83+
.Add("-p:IncludeNativeLibrariesForSelfExtract=true")));
84+
9585
LinuxOutputDirectory.TarGZipTo(
9686
LinuxGz,
9787
filter: x => !x.HasExtension(ExcludedExtensions),
9888
fileMode: FileMode.CreateNew);
9989
});
100-
90+
10191
Target Publish => _ => _
10292
.DependsOn(PublishWin, PublishLinux)
10393
.Executes(() =>
10494
{
10595
});
10696

107-
}
97+
}

0 commit comments

Comments
 (0)