Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1640e3b

Browse files
committed
Clean up pretty path with filepath.Clean
1 parent4318133 commit1640e3b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎cli/templatecreate.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,9 @@ func createValidTemplateVersion(cmd *cobra.Command, client *codersdk.Client, org
223223

224224
// prettyDirectoryPath returns a prettified path when inside the users
225225
// home directory. Falls back to dir if the users home directory cannot
226-
// discerned.
226+
// discerned. This function calls filepath.Clean on the result.
227227
funcprettyDirectoryPath(dirstring)string {
228+
dir=filepath.Clean(dir)
228229
homeDir,err:=os.UserHomeDir()
229230
iferr!=nil {
230231
returndir

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp