Skip to content

Commit c35ef22

Browse files
committed
Fix ci_has_next_support
1 parent d2219fb commit c35ef22

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

crates/next-api/src/next_server_nft.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ enum ServerNftType {
3838

3939
#[turbo_tasks::function]
4040
pub async fn next_server_nft_assets(project: Vc<Project>) -> Result<Vc<OutputAssets>> {
41-
let has_next_support = *project.next_config().ci_has_next_support().await?;
41+
let has_next_support = *project.ci_has_next_support().await?;
4242

4343
let minimal = ResolvedVc::upcast(
4444
ServerNftJsonAsset::new(project, ServerNftType::Minimal)
@@ -256,7 +256,7 @@ impl ServerNftJsonAsset {
256256
#[turbo_tasks::function]
257257
async fn ignores(&self) -> Result<Vc<Glob>> {
258258
let is_standalone = *self.project.next_config().is_standalone().await?;
259-
let has_next_support = *self.project.next_config().ci_has_next_support().await?;
259+
let has_next_support = *self.project.ci_has_next_support().await?;
260260
let project_path = self.project.project_path().owned().await?;
261261

262262
let output_file_tracing_excludes = self

crates/next-api/src/project.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,13 @@ impl Project {
763763
*self.env
764764
}
765765

766+
#[turbo_tasks::function]
767+
pub async fn ci_has_next_support(&self) -> Result<Vc<bool>> {
768+
Ok(Vc::cell(
769+
self.env.read(rcstr!("NOW_BUILDER")).await?.is_some(),
770+
))
771+
}
772+
766773
#[turbo_tasks::function]
767774
pub(super) fn current_node_js_version(&self) -> Vc<NodeJsVersion> {
768775
NodeJsVersion::Static(ResolvedVc::cell(self.current_node_js_version.clone())).cell()

crates/next-core/src/next_config.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,11 +1328,6 @@ impl NextConfig {
13281328
Vc::cell(self.output == Some(OutputType::Standalone))
13291329
}
13301330

1331-
#[turbo_tasks::function]
1332-
pub fn ci_has_next_support(&self) -> Vc<bool> {
1333-
Vc::cell(self.env.contains_key("NOW_BUILDER"))
1334-
}
1335-
13361331
#[turbo_tasks::function]
13371332
pub fn cache_handler(&self, project_path: FileSystemPath) -> Result<Vc<OptionFileSystemPath>> {
13381333
if let Some(handler) = &self.cache_handler {

0 commit comments

Comments
 (0)