Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Unified Diff: cipd/client/cipd/install_client_windows.go

Issue 2509803002: Add cipd selfupdate command. (Closed)
Patch Set: Add additional early-exit Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cipd/client/cipd/install_client.go ('k') | cipd/client/cipd/remote.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cipd/client/cipd/install_client_windows.go
diff --git a/cipd/client/cipd/install_client_windows.go b/cipd/client/cipd/install_client_windows.go
new file mode 100644
index 0000000000000000000000000000000000000000..5e303d409f3b66bd7c2ec874df54ed59cafc4894
--- /dev/null
+++ b/cipd/client/cipd/install_client_windows.go
@@ -0,0 +1,19 @@
+// Copyright 2015 The LUCI Authors. All rights reserved.
+// Use of this source code is governed under the Apache License, Version 2.0
+// that can be found in the LICENSE file.
+
+package cipd
+
+import (
+ "os"
+
+ "github.com/luci/luci-go/cipd/client/cipd/local"
+ "golang.org/x/net/context"
+)
+
+func (client *clientImpl) installClient(ctx context.Context, fs local.FileSystem, fetchURL, destination string) error {
+ return fs.EnsureFile(ctx, destination, func(of *os.File) error {
+ // TODO(iannucci): worry about owner/group/permissions?
+ return client.storage.download(ctx, fetchURL, of)
+ })
+}
« no previous file with comments | « cipd/client/cipd/install_client.go ('k') | cipd/client/cipd/remote.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698