New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 810548 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

"gn clean ." deletes (and recreates) the current directory

Project Member Reported by p...@chromium.org, Feb 8 2018

Issue description

What steps will reproduce the problem?
(1) gn clean .
(2) ninja chrome

What is the expected result?
chrome target is rebuilt.

What happens instead?
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
ninja: error: loading 'build.ninja': No such file or directory
 
Cc: brettw@chromium.org
Interesting, I wonder why we're deleting the whole directory rather than just the contents ... I suppose because it was simpler and we didn't think about this case.
Project Member

Comment 2 by bugdroid1@chromium.org, Mar 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1252d9cdc7a734579d6a6be97314c5cc541a7ccc

commit 1252d9cdc7a734579d6a6be97314c5cc541a7ccc
Author: Peter Collingbourne <pcc@chromium.org>
Date: Thu Mar 08 17:50:12 2018

gn clean: Don't delete and recreate the build directory.

This makes the behaviour of 'gn clean .' a little more shell-friendly.
Previously gn would delete the shell's current directory, which would
put the shell session into a confusing state where many commands
don't work without re-entering the directory.

Bug: 810548
Change-Id: I2f8849a770a394fe4c38ee771d0eb765dcbe1360
Reviewed-on: https://chromium-review.googlesource.com/954703
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Reviewed-by: Brett Wilson <brettw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541830}
[modify] https://crrev.com/1252d9cdc7a734579d6a6be97314c5cc541a7ccc/tools/gn/command_clean.cc

Sign in to add a comment