Skip to content

Commit bf47cd0

Browse files
committed
til
1 parent bc06aea commit bf47cd0

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

docs/works/tools-and-tales/tools/til/2503.ko.md

+38
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,42 @@ print(max(l)) # 111
5353
print(max(l)) # 111
5454
```
5555

56+
## _2025. 03. 08_
57+
58+
### `nodejs stdin is not a tty` 에러 대응
59+
60+
[Bash + Node.js + stdin/stdout redirection: error "not a tty" - Stack Overflow](https://stackoverflow.com/questions/45112889/bash-node-js-stdin-stdout-redirection-error-not-a-tty){:target="\_blank"}에 어느 정도 설명되어 있다. 아래와 같이 해결 가능하다.
61+
62+
``` bash
63+
$ node test.js < test.txt
64+
stdin is not a tty
65+
66+
$ node.exe test.js < test.txt
67+
(원하는 출력)
68+
```
69+
70+
## _2025. 03. 19_
71+
72+
### poetry의 lock에 대하여
73+
74+
[Basic usage | Documentation | Poetry - Python dependency management and packaging made easy](https://python-poetry.org/docs/basic-usage/#installing-dependencies){:target="\_blank"}에 따르면
75+
76+
- 처음 `poetry install`할때 lock 파일이 생긴다. 여기에 각종 dependency를 install하며 버전이 확정된다.
77+
- 이후 `poetry install`할때는 lock 파일에 있는 버전을 참고하여 dependency를 install한다.
78+
- 그러므로 이 lock 파일을 repository에 같이 commit해야 다른 개발자들도 같은 패키지 버전 조건 아래서 테스트 및 개발이 가능하다.
79+
- 하지만 패키지를 개발하는 상황이라면 패키지가 의존하는 다른 dependency들의 버전과 상관 없이 패키지가 작동해야 하므로 lock파일 없이 개발하거나, lock 파일의 dependency를 자주 최신화 해두어야 한다.
80+
81+
### poetry에 git dependency를 추가하는 방법
82+
83+
private repository에 만들어둔 패키지를 다른 프로젝트에서 활용하는 상황이 꽤 자주 있다. 이에 대한 해결 방안.
84+
85+
- [Dependency specification | Documentation | Poetry - Python dependency management and packaging made easy](https://python-poetry.org/docs/dependency-specification#git-dependencies){:target="\_blank"}에 기본적인 내용이 설명되어 있다.
86+
- `poetry add`를 사용하지 않고 앞선 링크에 나온 것처럼 `pyproject.toml` 파일에 직접 주소를 추가하는 것은 어쩔 수 없는 듯하다.
87+
- 문제는 token 값을 먹이는 건데,
88+
- [여기](https://github.com/orgs/python-poetry/discussions/3794){:target="\_blank"}에 많은 예시들이 있다.
89+
- `pyproject.toml` 파일에 토큰 값을 하드코딩 하는 방법도 있다.
90+
- poetry의 http-basic에 값을 설정하는 방법도 있다.
91+
- git의 명령어 자체를 갈아 끼우는 방식으로 token 노출을 막는 방법도 있다.
92+
- [여기](https://github.com/orgs/python-poetry/discussions/3794#discussioncomment-2368082){:target="\_blank"}에 ci 플로우에서 사용할 법한 방법이 소개되어 있다.
93+
5694
[:material-arrow-left-bold: 이전 페이지](../index.md){ .md-button }

0 commit comments

Comments
 (0)