Skip to content

Commit a9be60f

Browse files
committed
chore: Use quoted paths in error messages
1 parent 1c2d64c commit a9be60f

File tree

1 file changed

+7
-7
lines changed
  • rust/operator-binary/src/csi_server

1 file changed

+7
-7
lines changed

rust/operator-binary/src/csi_server/node.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ enum PublishError {
6565
#[snafu(display("backend failed to get secret data"))]
6666
BackendGetSecretData { source: backend::dynamic::DynError },
6767

68-
#[snafu(display("failed to create secret parent dir {}", path.display()))]
68+
#[snafu(display("failed to create secret parent dir {path:?}"))]
6969
CreateDir {
7070
source: std::io::Error,
7171
path: PathBuf,
7272
},
7373

74-
#[snafu(display("failed to mount volume mount directory {}", path.display()))]
74+
#[snafu(display("failed to mount volume mount directory {path:?}"))]
7575
Mount {
7676
source: std::io::Error,
7777
path: PathBuf,
@@ -80,28 +80,28 @@ enum PublishError {
8080
#[snafu(display("failed to convert secret data into desired format"))]
8181
FormatData { source: format::IntoFilesError },
8282

83-
#[snafu(display("failed to set volume permissions for {}", path.display()))]
83+
#[snafu(display("failed to set volume permissions for {path:?}"))]
8484
SetDirPermissions {
8585
source: std::io::Error,
8686
path: PathBuf,
8787
},
8888

89-
#[snafu(display("failed to create secret file {}", path.display()))]
89+
#[snafu(display("failed to create secret file {path:?}"))]
9090
CreateFile {
9191
source: std::io::Error,
9292
path: PathBuf,
9393
},
9494

95-
#[snafu(display("failed to write secret file {}", path.display()))]
95+
#[snafu(display("failed to write secret file {path:?}"))]
9696
WriteFile {
9797
source: std::io::Error,
9898
path: PathBuf,
9999
},
100100

101-
#[snafu(display("file path {} must not contain more than one component", path.display()))]
101+
#[snafu(display("file path {path:?} must not contain more than one component"))]
102102
InvalidComponentCount { path: PathBuf },
103103

104-
#[snafu(display("file path {} must not be absolute", path.display()))]
104+
#[snafu(display("file path {path:?} must not be absolute"))]
105105
InvalidAbsolutePath { path: PathBuf },
106106

107107
#[snafu(display("failed to tag pod with expiry metadata"))]

0 commit comments

Comments
 (0)