Skip to content

Commit

Permalink
Update the FileMetadata mode type to String
Browse files Browse the repository at this point in the history
The Ruby gem transmits this value as a String, because I think we
decided to this to make sure we transmit the value in a format we expect
to be human readable, like `00777` or `100777`. It's more flexible as a
String format.

Previously the value would be send as `33188`, but transformed it sends
it as `"100644"`.
  • Loading branch information
tombruijn committed Nov 2, 2021
1 parent eecb44d commit 9171182
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
bump: "patch"
---

Transmit the path file modes in the diagnose report as an octal number. Previously it send values like `33188` and now it transmits `100644`, which is a bit more human readable.
4 changes: 2 additions & 2 deletions packages/nodejs/src/diagnose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { JS_TO_RUBY_MAPPING } from "./config/configmap"
interface FileMetadata {
content?: string[]
exists: boolean
mode?: number
mode?: string
ownership?: {
gid: number
uid: number
Expand Down Expand Up @@ -161,7 +161,7 @@ export class DiagnoseTool {
paths[key] = {
...data,
exists: true,
mode,
mode: mode.toString(8),
ownership: {
gid,
uid
Expand Down

0 comments on commit 9171182

Please sign in to comment.