Skip to content

Commit

Permalink
fix: set env,key for string and value for string (denoland#1567)
Browse files Browse the repository at this point in the history
  • Loading branch information
caijw authored and ry committed Jan 24, 2019
1 parent 41cf828 commit 2547f02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/os.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ function createEnv(inner: msg.EnvironRes): { [index: string]: string } {
}

return new Proxy(env, {
set(obj, prop: string, value: string | number) {
setEnv(prop, value.toString());
set(obj, prop: string, value: string) {
setEnv(prop, value);
return Reflect.set(obj, prop, value);
}
});
Expand All @@ -115,7 +115,7 @@ function setEnv(key: string, value: string): void {

/** Returns a snapshot of the environment variables at invocation. Mutating a
* property in the object will set that variable in the environment for
* the process. The environment object will only accept `string`s or `number`s
* the process. The environment object will only accept `string`s
* as values.
*
* import { env } from "deno";
Expand Down

0 comments on commit 2547f02

Please sign in to comment.