Skip to content

Commit 233e58c

Browse files
committed
refactor: rename safeStdinRead
1 parent fda14db commit 233e58c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/commands/notes/create.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {CliUx, Flags} from '@oclif/core'
33

44
import HackMDCommand from '../../command'
55
import {commentPermission, noteContent, notePermission, noteTitle} from '../../flags'
6-
import {safePipeRead} from '../../utils'
6+
import {safeStdinRead} from '../../utils'
77

88
export default class Create extends HackMDCommand {
99
static description = 'Create a note'
@@ -31,7 +31,7 @@ raUuSTetT5uQbqQfLnz9lA A new note gvfz2UB5THiKABQJQnLs6Q
3131

3232
async run() {
3333
const {flags} = await this.parse(Create)
34-
const pipeString = safePipeRead()
34+
const pipeString = safeStdinRead()
3535

3636
const options: CreateNoteOptions = {
3737
title: flags.title,

src/commands/team-notes/create.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {CliUx, Flags} from '@oclif/core'
33

44
import HackMDCommand from '../../command'
55
import {commentPermission, noteContent, notePermission, noteTitle, teamPath} from '../../flags'
6-
import {safePipeRead} from '../../utils'
6+
import {safeStdinRead} from '../../utils'
77

88
export default class Create extends HackMDCommand {
99
static description = 'Create a team note'
@@ -31,7 +31,7 @@ raUuSTetT5uQbqQfLnz9lA A new note gvfz2UB5THiKABQJQnLs6Q n
3131

3232
async run() {
3333
const {flags} = await this.parse(Create)
34-
const pipeString = safePipeRead()
34+
const pipeString = safeStdinRead()
3535

3636
const {teamPath} = flags
3737
const options: CreateNoteOptions = {

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function setAccessTokenConfig(token: string) {
2424
})
2525
}
2626

27-
export function safePipeRead() {
27+
export function safeStdinRead() {
2828
let result
2929
try {
3030
result = fs.readFileSync(process.stdin.fd).toString()

0 commit comments

Comments
 (0)