Skip to content

Commit 2685021

Browse files
hakatashiclaude
andcommitted
fix: ricochet-robots の __dirname 依存パスを process.cwd() に変更
PR #1221 と同様、.build/ からの実行時に __dirname が変わりバイナリパスが ずれる問題を修正。process.cwd()(プロジェクトルート)を基準にすることで dev/production 両環境で正しいパスに解決される。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 43c180b commit 2685021

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ricochet-robots/rust-proxy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interface BoardSpec {
1212

1313
export const get_data = async (boardspec: BoardSpec) => {
1414
const generator = child_process.spawn(
15-
path.join(__dirname,'../target/release/ricochet_robot_problem_generator'),
15+
path.join(process.cwd(),'target/release/ricochet_robot_problem_generator'),
1616
[`${boardspec.depth}`,`${boardspec.size.h}`,`${boardspec.size.w}`,`${boardspec.numOfWalls}`]);
1717
const output = await new Promise((resolve) => {
1818
const stream = concatstream({ encoding: 'buffer' }, (data) => {

0 commit comments

Comments
 (0)